Skip nil exports

The actors may skip previously used but no longer defined method numbers.
This commit is contained in:
Steven Allen 2020-09-03 20:27:59 -07:00
parent 52ce80f2b4
commit 30fdff17b5

View File

@ -130,6 +130,9 @@ func (*Invoker) transform(instance Invokee) (nativeCode, error) {
}
code := make(nativeCode, len(exports))
for id, m := range exports {
if m == nil {
continue
}
meth := reflect.ValueOf(m)
code[id] = reflect.MakeFunc(reflect.TypeOf((invokeFunc)(nil)),
func(in []reflect.Value) []reflect.Value {