about summary refs log tree commit diff
path: root/pkg/lang/vm/utils.go
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-08-31 14:41:19 +0000
committerMel <einebeere@gmail.com>2022-08-31 14:41:19 +0000
commit00adb146a20d2985fd014c92b9d5cc07e0ab09b9 (patch)
tree6c3e06a6c95c5a6ec4a7654b42599c5aa7a0aa81 /pkg/lang/vm/utils.go
parentaeb63ade341572bb307f23ff7c501c48957cc7d4 (diff)
downloadjinx-00adb146a20d2985fd014c92b9d5cc07e0ab09b9.tar.zst
jinx-00adb146a20d2985fd014c92b9d5cc07e0ab09b9.zip
Add FromData function to create values easier
Diffstat (limited to 'pkg/lang/vm/utils.go')
-rw-r--r--pkg/lang/vm/utils.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/lang/vm/utils.go b/pkg/lang/vm/utils.go
index 166d404..26703b6 100644
--- a/pkg/lang/vm/utils.go
+++ b/pkg/lang/vm/utils.go
@@ -31,7 +31,7 @@ func (vm *VM) popCallAndDrop() (code.Pos, error) {
 		return code.Pos{}, err
 	}
 
-	if err := value.NewFunction(code.Pos{}, 0).WithData(fn).Drop(vm.memory); err != nil {
+	if err := value.FromData(fn).Drop(vm.memory); err != nil {
 		return code.Pos{}, err
 	}