We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78e80c8 commit a9c72e1Copy full SHA for a9c72e1
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -663,7 +663,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
663
val ptDefined = isFullyDefined(pt, ForceDegree.none)
664
if (ptDefined && !(avoidingType <:< pt)) avoidingType = pt
665
val tree1 = ascribeType(tree, avoidingType)
666
- assert(ptDefined || noLeaks(tree1), // `ptDefined` needed because of special case of anonymous classes
+ assert(ptDefined || noLeaks(tree1) || tree1.tpe.widen.isErroneous,
667
+ // `ptDefined` needed because of special case of anonymous classes
668
i"leak: ${escapingRefs(tree1, localSyms).toList}%, % in $tree1")
669
tree1
670
}
0 commit comments