Skip to content

[Scala] Added newline bailout for annotation type tails#2347

Merged
wbond merged 2 commits intosublimehq:masterfrom
djspiewak:bug/type-annotation-tails
Aug 18, 2020
Merged

[Scala] Added newline bailout for annotation type tails#2347
wbond merged 2 commits intosublimehq:masterfrom
djspiewak:bug/type-annotation-tails

Conversation

@djspiewak
Copy link
Copy Markdown
Contributor

Annotations at end-of-line within a single type expression would result in the subsequent line(s) being incorrectly scoped due to the way the lookahead was being processed. Catching this case explicitly allows us to (correctly) pop out of the context.

type Apply = F @uncheckedVariance
type A
// ^^^^ storage.type.scala
// ^ entity.name.type.scala
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should there be a } on the last line?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Very likely yes! It's been a while since I looked at this PR. I'll try to update it.

@wbond wbond merged commit 9cd8601 into sublimehq:master Aug 18, 2020
charlievieth pushed a commit to charlievieth/Packages that referenced this pull request Aug 25, 2020
mitranim pushed a commit to mitranim/Packages that referenced this pull request Mar 25, 2022
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.

2 participants