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:
@@ -61,6 +61,7 @@ func init() {
|
||||
|
||||
// _go_constant_Value is an interface wrapper for Value type
|
||||
type _go_constant_Value struct {
|
||||
IValue interface{}
|
||||
WExactString func() string
|
||||
WKind func() constant.Kind
|
||||
WString func() string
|
||||
|
||||
Reference in New Issue
Block a user