mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
reflect: implement Value.CanAddr
It is used in the crypto/sha512 test, for example. And it is very simple to implement.
This commit is contained in:
committed by
Ron Evans
parent
bcce296ca3
commit
2aa2e750b9
Vendored
+4
-1
@@ -315,7 +315,10 @@ func showValue(rv reflect.Value, indent string) {
|
||||
}
|
||||
print(indent+"reflect type: ", rt.Kind().String())
|
||||
if rv.CanSet() {
|
||||
print(" settable=", rv.CanSet())
|
||||
print(" settable=true")
|
||||
}
|
||||
if rv.CanAddr() {
|
||||
print(" addrable=true")
|
||||
}
|
||||
if !rt.Comparable() {
|
||||
print(" comparable=false")
|
||||
|
||||
Reference in New Issue
Block a user