interp: add support of interface wrappers to type assertions
Store the interpreter value of the interface object to wrap as a field called IValue, at offset 0 in wrapper structures. Update extract to include IValue field. In typeAssert, detect interface wrapper, and dereference the interpreter value from IValue wrapper field. Fixes #1166.
This commit is contained in:
@@ -1176,6 +1176,9 @@ func (t *itype) id() (res string) {
|
||||
case variadicT:
|
||||
res = "..." + t.val.id()
|
||||
}
|
||||
if res == "" {
|
||||
res = t.TypeOf().String()
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user