-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
Failed assertion on consuming a tuple accessor of a function result #3453
Comments
The reason for this is that the code in the refer pass at refer.c is assuming it gets a nested reference, if it has something with a DOT at hand and tries to call a method The solution i imagine is to verify a |
Thanks for reporting btw! :) |
Function calls in `consume` are deemed invalid by the syntax checker. However, they seep in via field accessors on the function call expressions. This change fixes ponylang#3453.
Function calls in `consume` are deemed invalid by the syntax checker. However, they seep in via field accessors on the function call expressions. This change fixes #3453.
* `consume (consume variable).field` must result in similar compiation error as * `consume (consume variable)`. * `consume f().field` must result in similar compilation error as `consume f()` * `(consume f).b` must be treated as `consume f.b` Fixes ponylang#3463, ponylang#3567 (and ponylang#3453)
* `consume (consume variable).field` must result in a similar compillation error as `consume (consume variable)`. * `consume f().field` must result in similar compilation error as `consume f()` * `(consume f).b` must be allowed and `f` should be moved. Fixes ponylang#3463, ponylang#3567 (and ponylang#3453)
The following code triggers an assertion fail:
The error (on a debug build) being:
The text was updated successfully, but these errors were encountered: