mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 22:13:39 +00:00
reflect: Value.Set: fix direction of assignment check
This commit is contained in:
@@ -907,7 +907,7 @@ func (it *MapIter) Next() bool {
|
||||
|
||||
func (v Value) Set(x Value) {
|
||||
v.checkAddressable()
|
||||
if !v.typecode.AssignableTo(x.typecode) {
|
||||
if !x.typecode.AssignableTo(v.typecode) {
|
||||
panic("reflect: cannot set")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user