aboutsummaryrefslogtreecommitdiff
path: root/src/internal/reflectlite/value.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/reflectlite/value.go')
-rw-r--r--src/internal/reflectlite/value.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/internal/reflectlite/value.go b/src/internal/reflectlite/value.go
index 85beea606c..0365eeeabf 100644
--- a/src/internal/reflectlite/value.go
+++ b/src/internal/reflectlite/value.go
@@ -160,7 +160,10 @@ type ValueError struct {
}
func (e *ValueError) Error() string {
- return "reflect: call of " + e.Method + " on zero Value"
+ if e.Kind == 0 {
+ return "reflect: call of " + e.Method + " on zero Value"
+ }
+ return "reflect: call of " + e.Method + " on " + e.Kind.String() + " Value"
}
// methodName returns the name of the calling method,