summaryrefslogtreecommitdiff
path: root/libgo/go/internal/reflectlite/type.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/internal/reflectlite/type.go')
-rw-r--r--libgo/go/internal/reflectlite/type.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/libgo/go/internal/reflectlite/type.go b/libgo/go/internal/reflectlite/type.go
index db1469d8371..b83d19b5e3f 100644
--- a/libgo/go/internal/reflectlite/type.go
+++ b/libgo/go/internal/reflectlite/type.go
@@ -99,13 +99,15 @@ const (
Func
Interface
Map
- Ptr
+ Pointer
Slice
String
Struct
UnsafePointer
)
+const Ptr = Pointer
+
// tflag is used by an rtype to signal what extra type information is
// available in the memory directly following the rtype value.
//
@@ -498,7 +500,7 @@ func (t *interfaceType) NumMethod() int { return len(t.methods) }
// TypeOf returns the reflection Type that represents the dynamic type of i.
// If i is a nil interface value, TypeOf returns nil.
-func TypeOf(i interface{}) Type {
+func TypeOf(i any) Type {
eface := *(*emptyInterface)(unsafe.Pointer(&i))
return toType(eface.typ)
}