From 64d438c91ace51bfda7bff50d381b62f5785f72a Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 16 Aug 2022 19:49:59 +0000 Subject: Ensure correct argument stack order in all cases --- pkg/lang/compiler/compiler_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pkg/lang/compiler/compiler_test.go') diff --git a/pkg/lang/compiler/compiler_test.go b/pkg/lang/compiler/compiler_test.go index 725620c..9e05230 100644 --- a/pkg/lang/compiler/compiler_test.go +++ b/pkg/lang/compiler/compiler_test.go @@ -457,7 +457,6 @@ func TestSimpleFunction(t *testing.T) { } func TestFunctionArgs(t *testing.T) { - // TODO: Are arguments in the correct order? src := ` fn add(a, b) { return a + b @@ -478,8 +477,8 @@ func TestFunctionArgs(t *testing.T) { halt @add: - get_local 1 get_local 0 + get_local 1 add ret ` @@ -581,11 +580,11 @@ func TestType(t *testing.T) { anchor_type get_local 2 - get_local 1 + get_local 0 set_member "name" get_local 2 - get_local 0 + get_local 1 set_member "age" get_local 2 -- cgit 1.4.1