Skip to content

Conversation

@smarter
Copy link
Member

@smarter smarter commented Nov 27, 2017

If the function prototype is a type variable, its upper bound might
contain useful information for inferring the return type of the
function. Before this PR, the added testcases failed because () => 4
was typed as () => Int and () => new Inv as () => Inv[Nothing],
even though the expected types of the functions give enough information
to correctly infer them.

If the function prototype is a type variable, its upper bound might
contain useful information for inferring the return type of the
function. Before this PR, the added testcases failed because `() => 4`
was typed as `() => Int` and `() => new Inv` as `() => Inv[Nothing]`,
even though the expected types of the functions give enough information
to correctly infer them.
@smarter smarter requested a review from odersky November 27, 2017 21:39
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

LGTM

@allanrenucci allanrenucci merged commit 634d153 into scala:master Nov 29, 2017
@allanrenucci allanrenucci deleted the fix-function-inference branch November 29, 2017 08:36
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.

3 participants