mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +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
@@ -156,7 +156,7 @@ func (v Value) CanInterface() bool {
|
||||
}
|
||||
|
||||
func (v Value) CanAddr() bool {
|
||||
panic("unimplemented: (reflect.Value).CanAddr()")
|
||||
return v.flags&(valueFlagIndirect) == valueFlagIndirect
|
||||
}
|
||||
|
||||
func (v Value) Addr() Value {
|
||||
|
||||
Reference in New Issue
Block a user