Skip to content

Fix #1868: Fix a logic error in a match #1869

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 2 commits into from
Jan 4, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jan 2, 2017

No description provided.

If a by-name arg has a bottom type, we need to create a closure with the
result type of the formal parameter, or else specialization with
FunctionalInterfaces will fail.
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Last commit LGTM but the commit before that belongs to another PR and should be removed from this branch.

@@ -1150,7 +1150,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
// classes defined in a such arguments should not be entered into the
// enclosing class.
c.exprContext(mdef, exprOwner)
case None => c
Copy link
Member

Choose a reason for hiding this comment

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

This is a perfect example of why we shouldn't turn off exhaustiveness warnings when guards are used ;) (cf: scala/scala#5617)

@@ -1150,7 +1150,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
// classes defined in a such arguments should not be entered into the
Copy link
Member

Choose a reason for hiding this comment

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

while you're at it, you could fix the typo here: "in a such" -> "in such"

@odersky
Copy link
Contributor Author

odersky commented Jan 4, 2017

The other PR got merged, so this one can go in as well.

@odersky odersky merged commit 621d11c into scala:master Jan 4, 2017
@allanrenucci allanrenucci deleted the fix-#1868 branch December 14, 2017 16:59
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