diff options
-rw-r--r-- | src/dotty/tools/dotc/typer/ProtoTypes.scala | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/ProtoTypes.scala b/src/dotty/tools/dotc/typer/ProtoTypes.scala index 7997d1cf4..97b47b2bd 100644 --- a/src/dotty/tools/dotc/typer/ProtoTypes.scala +++ b/src/dotty/tools/dotc/typer/ProtoTypes.scala @@ -320,10 +320,8 @@ object ProtoTypes { */ def constrained(pt: PolyType, owningTree: untpd.Tree)(implicit ctx: Context): (PolyType, List[TypeVar]) = { val state = ctx.typerState - def howmany = if (owningTree.isEmpty) "no" else "some" - def committable = if (ctx.typerState.isCommittable) "committable" else "uncommittable" - assert(owningTree.isEmpty != ctx.typerState.isCommittable, - s"inconsistent: $howmany typevars were added to $committable constraint ${state.constraint}") + assert(!(ctx.typerState.isCommittable && owningTree.isEmpty), + s"inconsistent: no typevars were added to committable constraint ${state.constraint}") def newTypeVars(pt: PolyType): List[TypeVar] = for (n <- (0 until pt.paramNames.length).toList) |