aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/reflect.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/abi/reflect.go')
-rw-r--r--accounts/abi/reflect.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/accounts/abi/reflect.go b/accounts/abi/reflect.go
index e953b77c1..fbcd576e5 100644
--- a/accounts/abi/reflect.go
+++ b/accounts/abi/reflect.go
@@ -85,3 +85,11 @@ func set(dst, src reflect.Value, output Argument) error {
}
return nil
}
+
+// requireAssignable assures that `dest` is a pointer and it's not an interface.
+func requireAssignable(dst, src reflect.Value) error {
+ if dst.Kind() != reflect.Ptr && dst.Kind() != reflect.Interface {
+ return fmt.Errorf("abi: cannot unmarshal %v into %v", src.Type(), dst.Type())
+ }
+ return nil
+}