mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 20:43:40 +00:00
reflect: return correct name for unsafe.Pointer type
For some reason, the type kind name is "unsafe.Pointer" while the .Name() method just returns "Pointer". Not sure why this difference exists, but to be able to test .Name() in testdata/reflect.go it needs to match.
This commit is contained in:
Vendored
+3
@@ -423,6 +423,9 @@ func showValue(rv reflect.Value, indent string) {
|
||||
if !rt.Comparable() {
|
||||
print(" comparable=false")
|
||||
}
|
||||
if name := rt.Name(); name != "" {
|
||||
print(" name=", name)
|
||||
}
|
||||
println()
|
||||
switch rt.Kind() {
|
||||
case reflect.Bool:
|
||||
|
||||
Reference in New Issue
Block a user