Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something is wrong with closures #28

Closed
Simn opened this issue Apr 1, 2019 · 0 comments
Closed

Something is wrong with closures #28

Simn opened this issue Apr 1, 2019 · 0 comments

Comments

@Simn
Copy link
Owner

Simn commented Apr 1, 2019

The unit tests throw this at me:

Error: Expr function(c2:Int) {
        return a26 + b17 + c2;
}
Stack error
        ops      :
                 121 ldc_w 329 [(Lunit/TestArrowFunctions$2;I)I]
                 121   new 318 [, (Lunit/TestArrowFunctions$2;I)I]
                 121       dup [, , (Lunit/TestArrowFunctions$2;I)I]
                 121   aload_0 [Ljava/lang/Integer;, , , (Lunit/TestArrowFunctions$2;I)I]
                 121   iload_1 [I, Ljava/lang/Integer;, , , (Lunit/TestArrowFunctions$2;I)I]
             line: 121
        operation: invokespecial unit/TestArrowFunctions$2.<init>:(II)V
        expected : [I, I, Lunit/TestArrowFunctions$2;]
        actual   : [I, Ljava/lang/Integer;, , , (Lunit/TestArrowFunctions$2;I)I]
Method unit.TestArrowFunctions.testSyntax

This probably means that there's some disconnect between types somewhere. Relying on v_type is bad because the run-time type could be something else if captured.

@Simn Simn closed this as completed in 4ad8379 Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant