Skip nil exports
The actors may skip previously used but no longer defined method numbers.
This commit is contained in:
parent
52ce80f2b4
commit
30fdff17b5
@ -130,6 +130,9 @@ func (*Invoker) transform(instance Invokee) (nativeCode, error) {
|
|||||||
}
|
}
|
||||||
code := make(nativeCode, len(exports))
|
code := make(nativeCode, len(exports))
|
||||||
for id, m := range exports {
|
for id, m := range exports {
|
||||||
|
if m == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
meth := reflect.ValueOf(m)
|
meth := reflect.ValueOf(m)
|
||||||
code[id] = reflect.MakeFunc(reflect.TypeOf((invokeFunc)(nil)),
|
code[id] = reflect.MakeFunc(reflect.TypeOf((invokeFunc)(nil)),
|
||||||
func(in []reflect.Value) []reflect.Value {
|
func(in []reflect.Value) []reflect.Value {
|
||||||
|
Loading…
Reference in New Issue
Block a user