aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'testdata')
-rw-r--r--testdata/reflect.go1
-rw-r--r--testdata/reflect.txt5
2 files changed, 6 insertions, 0 deletions
diff --git a/testdata/reflect.go b/testdata/reflect.go
index 1a92e47ab..595aaa8cf 100644
--- a/testdata/reflect.go
+++ b/testdata/reflect.go
@@ -456,6 +456,7 @@ func showValue(rv reflect.Value, indent string) {
case reflect.Interface:
println(indent + " interface")
println(indent+" nil:", rv.IsNil())
+ println(indent+" NumMethod:", rv.NumMethod())
if !rv.IsNil() {
showValue(rv.Elem(), indent+" ")
}
diff --git a/testdata/reflect.txt b/testdata/reflect.txt
index e4a92a5e1..3f1b5a17b 100644
--- a/testdata/reflect.txt
+++ b/testdata/reflect.txt
@@ -80,6 +80,7 @@ reflect type: ptr
reflect type: interface settable=true addrable=true
interface
nil: true
+ NumMethod: 1
reflect type: ptr
pointer: true int
nil: false
@@ -240,6 +241,7 @@ reflect type: struct
reflect type: interface caninterface=false
interface
nil: true
+ NumMethod: 1
reflect type: struct
struct: 3
field: 0 a
@@ -371,12 +373,14 @@ reflect type: slice comparable=false
reflect type: interface settable=true addrable=true
interface
nil: false
+ NumMethod: 0
reflect type: int
int: 3
indexing: 1
reflect type: interface settable=true addrable=true
interface
nil: false
+ NumMethod: 0
reflect type: string
string: str 3
reflect type: uint8
@@ -389,6 +393,7 @@ reflect type: slice comparable=false
reflect type: interface settable=true addrable=true
interface
nil: false
+ NumMethod: 0
reflect type: complex128
complex: (-4.000000e+000+2.500000e+000i)
reflect type: ptr