Skip to content

Fix #5013: Check statement purity for adapted expressions of Unit #5707

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 4 commits into from
Jan 15, 2019

Conversation

nicolasstucki
Copy link
Contributor

def foo: Unit = 2 

is adapted to

def foo: Unit = { 2; () } 

Hence the expression 2 is a statement and need to be handled as such.

@biboudis
Copy link
Contributor

LGTM!

After all tests pass, can you also provide a few more tests that exercise the behavior of the other conditions as well?

@biboudis biboudis merged commit 0c66517 into scala:master Jan 15, 2019
@biboudis biboudis deleted the fix-#5013 branch January 15, 2019 10:53
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