Skip to content

Fix #4453: Avoid adding type bindings in getVariables #5849

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 5, 2019

Conversation

nicolasstucki
Copy link
Contributor

getVariables is used when desugaring val/var/lazy val pat = e but after other errors
pat may contain a type name.

getVariables is used when desugaring `val/var/lazy val pat = e` but after other errors
`pat` may contain a type name.
Copy link
Contributor

@abgruszecki abgruszecki left a comment

Choose a reason for hiding this comment

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

LGTM. Today I Learned that var bindings can be destructuring and this is perfectly legal code:

var Some(z) = Some(0)

By the way, that definition seems to put current master into an infinite loop and this commit fixes that as well :)

EDIT: scratch that, I just double checked if master actually chokes on that definition to see if maybe we shouldn't add it as a test. Turns out it does not, must've been something weird going on in my environment which was fixed when I switched branches and cleaned everything.

@abgruszecki abgruszecki merged commit 0d63b0c into scala:master Feb 5, 2019
@ghost ghost removed the stat:needs review label Feb 5, 2019
@abgruszecki abgruszecki deleted the fix-#4453 branch February 5, 2019 16:01
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