Skip to content

[Lexer] Don't setEscapedIdentifier(true) for tok::eof at ArtificialEOF #14505

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

Merged
merged 1 commit into from
Feb 12, 2018

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Feb 9, 2018

SR-6926 rdar://problem/37290899

This happens when the Parser re-lexing comment tokens that sets
ArtificialEOF at the end of comment range.
It used to cause an assertion failure (!value || Kind == tok::identifier) && "only identifiers can be escaped identifiers"

@rintaro
Copy link
Member Author

rintaro commented Feb 9, 2018

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor

I'm not so familiar with this part of the code but it does look like you've fixed the problem! The original test case used `init`, though, not as a function name but just as if it were a keyword. Can you include that as a test case here?

https://bugs.swift.org/browse/SR-6926

This happens when the Parser re-lexing comment tokens that sets
ArtificialEOF at the end of comment range.
It used to cause an assertion failure:
(!value || Kind == tok::identifier) && "only identifiers can be escaped identifiers"
@rintaro
Copy link
Member Author

rintaro commented Feb 12, 2018

@swift-ci Please smoke test

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

Successfully merging this pull request may close these issues.

3 participants