File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ object ProtoTypes {
483
483
val state = ctx.typerState
484
484
val addTypeVars = alwaysAddTypeVars || ! owningTree.isEmpty
485
485
if (tl.isInstanceOf [PolyType ])
486
- assert(! ( ctx.typerState.isCommittable && ! addTypeVars) ,
486
+ assert(! ctx.typerState.isCommittable || addTypeVars,
487
487
s " inconsistent: no typevars were added to committable constraint ${state.constraint}" )
488
488
// hk type lambdas can be added to constraints without typevars during match reduction
489
489
@@ -502,8 +502,8 @@ object ProtoTypes {
502
502
(added, tvars)
503
503
}
504
504
505
- /** Same as ` constrained(tl, EmptyTree)`, but returns just the created type lambda */
506
- def constrained (tl : TypeLambda )( implicit ctx : Context ) : TypeLambda = constrained(tl, EmptyTree )._1
505
+ def constrained (tl : TypeLambda )( implicit ctx : Context ) : TypeLambda =
506
+ constrained(tl, EmptyTree , alwaysAddTypeVars = ctx.typerState.isCommittable )._1
507
507
508
508
def newTypeVar (bounds : TypeBounds )(implicit ctx : Context ): TypeVar = {
509
509
val poly = PolyType (DepParamName .fresh().toTypeName :: Nil )(
You can’t perform that action at this time.
0 commit comments