We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent beff8ba commit 6327c16Copy full SHA for 6327c16
compiler/natives/src/reflect/reflect.go
@@ -1436,12 +1436,10 @@ func (v Value) Set(x Value) {
1436
x = x.assignTo("reflect.Set", v.typ, nil)
1437
if v.flag&flagIndir != 0 {
1438
switch v.typ.Kind() {
1439
- case Array:
+ case Array, Struct:
1440
jsType(v.typ).Call("copy", js.InternalObject(v.ptr), js.InternalObject(x.ptr))
1441
case Interface:
1442
js.InternalObject(v.ptr).Call("$set", js.InternalObject(valueInterface(x, false)))
1443
- case Struct:
1444
- copyStruct(js.InternalObject(v.ptr), js.InternalObject(x.ptr), v.typ)
1445
default:
1446
js.InternalObject(v.ptr).Call("$set", x.object())
1447
}
0 commit comments