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 parser crash for 'alias Foo?' #8282

Merged
merged 2 commits into from Oct 8, 2019
Merged

Conversation

oprypin
Copy link
Member

@oprypin oprypin commented Oct 6, 2019

cast from Crystal::Generic to Crystal::Path failed

(found by fuzzing)

Also make all parse_ident() calls more consistent

> cast from Crystal::Generic to Crystal::Path failed
Copy link
Member

@asterite asterite left a comment

Choose a reason for hiding this comment

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

Good catch, thank you! I added a suggestion for a refactor so that there isn't a lot of duplication.

src/compiler/crystal/syntax/parser.cr Outdated Show resolved Hide resolved
for more consistent error checking.
@bcardiff bcardiff added this to the 0.32.0 milestone Oct 8, 2019
@bcardiff bcardiff merged commit b40ad4d into crystal-lang:master Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants