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

Fix compiler assertion failure on unused reference to _ #2091

Merged
merged 1 commit into from
Jul 26, 2017

Conversation

Praetonus
Copy link
Member

Closes #2073.

@Praetonus Praetonus added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Jul 26, 2017
" _\n"
" end";

TEST_COMPILE(src);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to allow this? It seems like _ should only be used where you would otherwise be forced to give an identifier, not as an empty branch "filler" (None should be used for that).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently allow _ anywhere an identifier is allowed, except when the value would be needed. I don't really see a problem with allowing _ in the fixed case, and I'm also not sure where we'd draw the line between allowed and forbidden.

@jemc jemc changed the title Fix assertion failure on unused reference to _ Fix compiler assertion failure on unused reference to _ Jul 26, 2017
@jemc jemc merged commit 456b458 into ponylang:master Jul 26, 2017
ponylang-main added a commit that referenced this pull request Jul 26, 2017
@Praetonus Praetonus deleted the fix-2073 branch July 26, 2017 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants