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.
2 parents e0e1c80 + a38a6a7 commit 317505eCopy full SHA for 317505e
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -715,7 +715,7 @@ class Typer extends Namer
715
716
def escapingRefs(block: Tree, localSyms: => List[Symbol])(implicit ctx: Context): collection.Set[NamedType] = {
717
lazy val locals = localSyms.toSet
718
- block.tpe namedPartsWith (tp => locals.contains(tp.symbol))
+ block.tpe.namedPartsWith(tp => locals.contains(tp.symbol) && !tp.isErroneous)
719
}
720
721
/** Ensure that an expression's type can be expressed without references to locally defined
0 commit comments