-
-
Notifications
You must be signed in to change notification settings - Fork 409
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 crashing when Main.create has an undefined method #2508
Comments
So here is a simpler version that crashes the compiler, the problem is I misspelled
Here is the crash
|
winksaville
changed the title
ponyc crash
ponyc crashing with invoking a undefined method
Jan 20, 2018
winksaville
changed the title
ponyc crashing with invoking a undefined method
Compiler crashing when invoking an undefined method
Jan 20, 2018
winksaville
changed the title
Compiler crashing when invoking an undefined method
Compiler crashing when Main.create has an undefined method
Jan 20, 2018
I can reproduce with latest ponyc |
This is a problem with the compiler name suggestions (assertion at line 228): ponyc/src/libponyc/pass/refer.c Lines 192 to 233 in 0dfa0e6
|
This was referenced Feb 13, 2018
PR #2552 is a possible fix for this issue. |
jemc
pushed a commit
that referenced
this issue
Feb 28, 2018
…2552) * Fix for issue 2508 The pony_assert(ast_id(id == TK_ID) assumes that ast_id(id)) is always a TK_ID, but that is not the true if the first child of case_ast is a function or behavior. This fix checks for a TK_ID for both first and second children of case_ast and gives up if neither is a TK_ID instead of asserting. * Add tests for suggest_alt_name There are three cases tested plus a test for nothing can be suggested.
Fixed with #2552 being merged. |
dipinhora
pushed a commit
to dipinhora/ponyc
that referenced
this issue
Jun 5, 2018
…#2508). (ponylang#2552) * Fix for issue 2508 The pony_assert(ast_id(id == TK_ID) assumes that ast_id(id)) is always a TK_ID, but that is not the true if the first child of case_ast is a function or behavior. This fix checks for a TK_ID for both first and second children of case_ast and gives up if neither is a TK_ID instead of asserting. * Add tests for suggest_alt_name There are three cases tested plus a test for nothing can be suggested.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code below and here on playground crashes the compiler:
Here is the stack trace:
This is from a debug version of current master as of today:
I'll be working on getting it to compile and updating this issue as I learn more.
The text was updated successfully, but these errors were encountered: