aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-01-18 18:50:55 +0100
committerMartin Odersky <odersky@gmail.com>2015-01-18 18:50:55 +0100
commit23ae8d935ccac3a814140534d4c9df76e0b3d345 (patch)
tree830b566d99cf68c12719721660a74fea24c82bac /src
parent952aa7f8d17579d3ee1b20ea177206e570de497f (diff)
downloaddotty-23ae8d935ccac3a814140534d4c9df76e0b3d345.tar.gz
dotty-23ae8d935ccac3a814140534d4c9df76e0b3d345.tar.bz2
dotty-23ae8d935ccac3a814140534d4c9df76e0b3d345.zip
Dropped non-sensical transform in unify
dropParamsIn extrapolates parameters with Nothing/Any. This has nothing to do with unification! The dropParamsIn transform could not be eleiminated previously because it caused faulures. Nice to see that it works now!
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/core/TrackingConstraint.scala4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/TrackingConstraint.scala b/src/dotty/tools/dotc/core/TrackingConstraint.scala
index 18e37a73e..34b97c99e 100644
--- a/src/dotty/tools/dotc/core/TrackingConstraint.scala
+++ b/src/dotty/tools/dotc/core/TrackingConstraint.scala
@@ -306,9 +306,7 @@ class TrackingConstraint(private val myMap: ParamInfo,
}
def unify(p1: PolyParam, p2: PolyParam)(implicit ctx: Context): This = {
- val p1Bounds =
- dropParamIn(nonParamBounds(p1), p2.binder, p2.paramNum) &
- dropParamIn(nonParamBounds(p2), p1.binder, p1.paramNum)
+ val p1Bounds = (nonParamBounds(p1) & nonParamBounds(p2)).substParam(p2, p1)
this.updateEntry(p1, p1Bounds).updateEntry(p2, p1)
}