Skip to content

Remove unnecessary call to constrainResult #13742

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
Nov 3, 2021

Conversation

smarter
Copy link
Member

@smarter smarter commented Oct 13, 2021

This was originally added in #1395 to make the following compile:

(1, x => 2): (Int, Int => Int)

But reverting this change doesn't break anything anymore: the other call
to constrainResult in Application#init is enough to propagate the
constraint needed to type lambda. The strange thing is that this call
already existed before #1395, I don't know why it wasn't enough back then.

This was originally added in scala#1395 to make the following compile:

    (1, x => 2): (Int, Int => Int)

But reverting this change doesn't break anything anymore: the other call
to `constrainResult` in `Application#init` is enough to propagate the
constraint needed to type lambda. The strange thing is that this call
already existed before scala#1395, I don't know why it wasn't enough back then.
@odersky odersky merged commit 9153fe5 into scala:master Nov 3, 2021
@odersky odersky deleted the less-constrainResult branch November 3, 2021 09:48
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