Selaa lähdekoodia

Fixed export() on functions that override Call()

Dmitry Panov 2 vuotta sitten
vanhempi
commit
2c325f1ef6
1 muutettua tiedostoa jossa 12 lisäystä ja 0 poistoa
  1. 12 0
      func.go

+ 12 - 0
func.go

@@ -562,6 +562,10 @@ func (f *asyncFuncObject) assertCallable() (func(FunctionCall) Value, bool) {
 	return f.Call, true
 }
 
+func (f *asyncFuncObject) export(*objectExportCtx) interface{} {
+	return f.Call
+}
+
 func (f *asyncArrowFuncObject) Call(call FunctionCall) Value {
 	return f.asyncCall(call, f.arrowFuncObject.vmCall)
 }
@@ -570,6 +574,10 @@ func (f *asyncArrowFuncObject) assertCallable() (func(FunctionCall) Value, bool)
 	return f.Call, true
 }
 
+func (f *asyncArrowFuncObject) export(*objectExportCtx) interface{} {
+	return f.Call
+}
+
 func (f *asyncArrowFuncObject) vmCall(vm *vm, n int) {
 	f.asyncVmCall(vm, n, f.arrowFuncObject.vmCall)
 }
@@ -582,6 +590,10 @@ func (f *asyncMethodFuncObject) assertCallable() (func(FunctionCall) Value, bool
 	return f.Call, true
 }
 
+func (f *asyncMethodFuncObject) export(ctx *objectExportCtx) interface{} {
+	return f.Call
+}
+
 func (f *asyncMethodFuncObject) vmCall(vm *vm, n int) {
 	f.asyncVmCall(vm, n, f.methodFuncObject.vmCall)
 }