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

Compiler assertion failure for lambdas without explicit type declaration #1702

Closed
ergl opened this issue Mar 16, 2017 · 2 comments
Closed

Compiler assertion failure for lambdas without explicit type declaration #1702

ergl opened this issue Mar 16, 2017 · 2 comments

Comments

@ergl
Copy link
Member

ergl commented Mar 16, 2017

I got a compiler assertion error from the following code

actor Main
    new create(env: Env) =>
        {(a) => a}

Full backtrace:

Building builtin -> /usr/local/Cellar/ponyc/0.11.2/packages/builtin
Building . -> /Users/ryan/Downloads/test
src/libponyc/pass/scope.c:19: set_scope: Assertion `ast_id(name) == TK_ID` failed.

Backtrace:
  0   ponyc                               0x000000010a1cb837 ponyint_assert_fail + 176
  1   ponyc                               0x000000010a1a8ad3 set_scope + 391
  2   ponyc                               0x000000010a1a8e38 pass_scope + 838
  3   ponyc                               0x000000010a1a80e5 ast_visit + 115
  4   ponyc                               0x000000010a1a8159 ast_visit + 231
  5   ponyc                               0x000000010a1a8159 ast_visit + 231
  6   ponyc                               0x000000010a1a8159 ast_visit + 231
  7   ponyc                               0x000000010a1a8159 ast_visit + 231
  8   ponyc                               0x000000010a1a856b visit_pass + 77
  9   ponyc                               0x000000010a1a8367 ast_passes + 119
  10  ponyc                               0x000000010a1a8702 ast_passes_type + 177
  11  ponyc                               0x000000010a196bee expr_object + 2949
  12  ponyc                               0x000000010a1a5653 pass_expr + 236
  13  ponyc                               0x000000010a1a8193 ast_visit + 289
  14  ponyc                               0x000000010a1a856b visit_pass + 77
  15  ponyc                               0x000000010a1a8492 ast_passes + 418
  16  ponyc                               0x000000010a195f1b expr_lambda + 2401
  17  ponyc                               0x000000010a1a5660 pass_expr + 249
  18  ponyc                               0x000000010a1a8193 ast_visit + 289
  19  ponyc                               0x000000010a1a8159 ast_visit + 231
  20  ponyc                               0x000000010a1a8159 ast_visit + 231
  21  ponyc                               0x000000010a1a8159 ast_visit + 231
  22  ponyc                               0x000000010a1a8159 ast_visit + 231
  23  ponyc                               0x000000010a1a8159 ast_visit + 231
  24  ponyc                               0x000000010a1a8159 ast_visit + 231
  25  ponyc                               0x000000010a1a8159 ast_visit + 231
  26  ponyc                               0x000000010a1a856b visit_pass + 77
  27  ponyc                               0x000000010a1a8492 ast_passes + 418
  28  ponyc                               0x000000010a1b6a8e program_load + 158
  29  ponyc                               0x000000010a145258 compile_package + 24
  30  ponyc                               0x000000010a145133 main + 1187
  31  libdyld.dylib                       0x00007fff92dc95ad start + 1
This is an optimised version of ponyc: the backtrace may be imprecise or incorrect.
Use a debug version to get more meaningful information.
Illegal instruction: 4

Pony compiler version (installed through Homebrew):

> ponyc -v
0.11.2 [release]
compiled with: llvm 3.8.1 -- Apple LLVM version 8.0.0 (clang-800.0.42.1)

Running on El Capitan

@SeanTAllen
Copy link
Member

This is a bug that should be caught in the syntax pass for not having a type in the parameter.

@ergl
Copy link
Member Author

ergl commented Jul 8, 2017

This was fixed by #2011 (thanks!), so I'll close this now.

@ergl ergl closed this as completed Jul 8, 2017
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

3 participants