File tree 1 file changed +1
-9
lines changed
src/dotty/tools/dotc/typer
1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -515,16 +515,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
515
515
}
516
516
517
517
def escapingRefs (block : Tree , localSyms : => List [Symbol ])(implicit ctx : Context ): collection.Set [NamedType ] = {
518
- var hoisted : Set [Symbol ] = Set ()
519
518
lazy val locals = localSyms.toSet
520
- def leakingTypes (tp : Type ): collection.Set [NamedType ] =
521
- tp namedPartsWith (tp => locals.contains(tp.symbol))
522
- def typeLeaks (tp : Type ): Boolean = leakingTypes(tp).nonEmpty
523
- def classLeaks (sym : ClassSymbol ): Boolean =
524
- (ctx.owner is Method ) || // can't hoist classes out of method bodies
525
- (sym.info.parents exists typeLeaks) ||
526
- (sym.info.decls.toList exists (t => typeLeaks(t.info)))
527
- leakingTypes(block.tpe)
519
+ block.tpe namedPartsWith (tp => locals.contains(tp.symbol))
528
520
}
529
521
530
522
/** Check that expression's type can be expressed without references to locally defined
You can’t perform that action at this time.
0 commit comments