diff options
Diffstat (limited to 'libgo/go/go/constant/value.go')
-rw-r--r-- | libgo/go/go/constant/value.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libgo/go/go/constant/value.go b/libgo/go/go/constant/value.go index 78cb3f896f5..dee3bce9eef 100644 --- a/libgo/go/go/constant/value.go +++ b/libgo/go/go/constant/value.go @@ -24,6 +24,8 @@ import ( "unicode/utf8" ) +//go:generate stringer -type Kind + // Kind specifies the kind of value represented by a Value. type Kind int @@ -577,7 +579,7 @@ func Float64Val(x Value) (float64, bool) { // Float *big.Float or *big.Rat // everything else nil // -func Val(x Value) interface{} { +func Val(x Value) any { switch x := x.(type) { case boolVal: return bool(x) @@ -608,7 +610,7 @@ func Val(x Value) interface{} { // *big.Rat Float // anything else Unknown // -func Make(x interface{}) Value { +func Make(x any) Value { switch x := x.(type) { case bool: return boolVal(x) |