]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: update docs; Interface can return a method value
authorAndrew Gerrand <adg@golang.org>
Tue, 24 Sep 2013 00:49:54 +0000 (10:49 +1000)
committerAndrew Gerrand <adg@golang.org>
Tue, 24 Sep 2013 00:49:54 +0000 (10:49 +1000)
Fixes #6460.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13761046

src/pkg/reflect/value.go

index 20fc459e590afdbb994e4d6c15c1617145a8ff47..5acb69efa6bd4c15a2f46e92db526c8bceeb19ee 100644 (file)
@@ -971,10 +971,7 @@ func (v Value) CanInterface() bool {
 // Interface returns v's current value as an interface{}.
 // It is equivalent to:
 //     var i interface{} = (v's underlying value)
-// If v is a method obtained by invoking Value.Method
-// (as opposed to Type.Method), Interface cannot return an
-// interface value, so it panics.
-// It also panics if the Value was obtained by accessing
+// It panics if the Value was obtained by accessing
 // unexported struct fields.
 func (v Value) Interface() (i interface{}) {
        return valueInterface(v, true)