File tree 1 file changed +5
-2
lines changed
src/dotty/tools/dotc/core 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,11 @@ trait ConstraintHandling {
89
89
protected def addLess (p1 : PolyParam , p2 : PolyParam ): Boolean = {
90
90
def description = i " ordering $p1 <: $p2 to \n $constraint"
91
91
val res =
92
- if (constraint.isLess(p2, p1)) unify(p2, p1)
92
+ if (constraint.isLess(p2, p1))
93
+ if (p2.binder.isInstanceOf [TypeLambda ] && ! p1.binder.isInstanceOf [TypeLambda ])
94
+ unify(p1, p2)
95
+ else
96
+ unify(p2, p1)
93
97
else {
94
98
val down1 = p1 :: constraint.exclusiveLower(p1, p2)
95
99
val up2 = p2 :: constraint.exclusiveUpper(p2, p1)
@@ -109,7 +113,6 @@ trait ConstraintHandling {
109
113
*/
110
114
private def unify (p1 : PolyParam , p2 : PolyParam ): Boolean = {
111
115
constr.println(s " unifying $p1 $p2" )
112
- assert(constraint.isLess(p1, p2))
113
116
val down = constraint.exclusiveLower(p2, p1)
114
117
val up = constraint.exclusiveUpper(p1, p2)
115
118
needsCleanup = true
You can’t perform that action at this time.
0 commit comments