fix: interface call regression from #787
Fix #787 changes how interfaces are set on a struct (compositeSparce). This change however makes calling the interface panic. This PR reverts part of the change in #787 and adds a test to ensure it does not break again.
This commit is contained in:
@@ -2116,8 +2116,6 @@ func doCompositeSparse(n *node, hasType bool) {
|
||||
switch {
|
||||
case c1.typ.cat == funcT:
|
||||
values[field] = genFunctionWrapper(c1)
|
||||
case c1.typ.cat == interfaceT:
|
||||
values[field] = genValueInterfaceValue(c1)
|
||||
case isArray(c1.typ) && c1.typ.val != nil && c1.typ.val.cat == interfaceT:
|
||||
values[field] = genValueInterfaceArray(c1)
|
||||
case isRecursiveType(n.typ.field[field].typ, n.typ.field[field].typ.rtype):
|
||||
|
||||
Reference in New Issue
Block a user