aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-10-31 12:14:50 +0100
committerMartin Odersky <odersky@gmail.com>2013-10-31 12:14:50 +0100
commitdbaf6f42da9e5eb950d1a21b1912d417536330f7 (patch)
treeaf013713f4a9cd2f1493c4f24fa1aa4f4cde1973 /src/dotty/tools/dotc/core/Types.scala
parent8c6b062a4b2c6323287441e37cef01acd9a4d7ac (diff)
downloaddotty-dbaf6f42da9e5eb950d1a21b1912d417536330f7.tar.gz
dotty-dbaf6f42da9e5eb950d1a21b1912d417536330f7.tar.bz2
dotty-dbaf6f42da9e5eb950d1a21b1912d417536330f7.zip
Fixes to subtyping tests for constrained parameters.
1. When testing A <:< B where A and B are both in the current constraint set, we used to do a A <:< L first, where L is the lower bound of B. But that gives the wrong upper bound to A, it should be B instead of L!. This comment corrects that. 2. Again when testing A <:< B we need to record B as an upper bound of A, but also record A as a lower bound of B. That way, either instantiation of A and B will propagate correctly. If we dod not do that and just recorded B as upper bound of A, we could then minimize B to Nothing, so A would be forced to Nothing as well. This is clearly wrong. We should have minimized B to A instead.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
0 files changed, 0 insertions, 0 deletions