Skip to content

Commit 9ac2d67

Browse files
authored
Merge pull request #2891 from dotty-staging/fix-#2672
Revert: Avoid assertion failure on neg test
2 parents a33258e + beff5cb commit 9ac2d67

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
217217
// apply the result type constraint, unless method type is dependent
218218
val resultApprox = resultTypeApprox(methType)
219219
val savedConstraint = ctx.typerState.constraint
220-
if (!resultApprox.isInstanceOf[PolyType] &&
221-
// temporary fix before #2121 is in. The problem here is that errors in the code
222-
// can lead to the result type begin higher-kinded. Then normalize gets confused
223-
// and we end up with an assertion violation "s"inconsistent: no typevars were
224-
// added to committable constraint". Once we distinguish between type lambdas
225-
// and polytypes again this should hopefully become unnecessary. The error
226-
// was triggered by neg/enums.scala.
227-
!constrainResult(resultApprox, resultType))
220+
if (!constrainResult(resultApprox, resultType))
228221
if (ctx.typerState.isCommittable)
229222
// defer the problem until after the application;
230223
// it might be healed by an implicit conversion

0 commit comments

Comments
 (0)