Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Jan 14, 2018

If variance == 0, we have to choice whether to instantiate a type variable
to its lower or upper bound. We used to always pick the lower bound, but now
we pick the upper bound if the lower bound is Nothing.

If variance == 0, we have to choice whether to instantiate a type variable
to its lower or upper bound. We used to always pick the lower bound, but now
we pick the upper bound if the lower bound is Nothing.
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.

Note that this kind of duplicate the existing logic in IsFullyDefinedAccumulator (https://github.com/dotty-staging/dotty/blob/1ab60276f5684ec7c80f3fed3c0f52ab491ecca6/compiler/src/dotty/tools/dotc/typer/Inferencing.scala#L115), I plan to try to share more core between it and interpolateUndetVars, but until then this is fine I guess.

@odersky odersky merged commit e64e2d3 into scala:master Jan 14, 2018
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