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 @@ -450,16 +450,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
450
450
}
451
451
452
452
def escapingRefs (block : Tree , localSyms : => List [Symbol ])(implicit ctx : Context ): collection.Set [NamedType ] = {
453
- var hoisted : Set [Symbol ] = Set ()
454
453
lazy val locals = localSyms.toSet
455
- def leakingTypes (tp : Type ): collection.Set [NamedType ] =
456
- tp namedPartsWith (tp => locals.contains(tp.symbol))
457
- def typeLeaks (tp : Type ): Boolean = leakingTypes(tp).nonEmpty
458
- def classLeaks (sym : ClassSymbol ): Boolean =
459
- (ctx.owner is Method ) || // can't hoist classes out of method bodies
460
- (sym.info.parents exists typeLeaks) ||
461
- (sym.info.decls.toList exists (t => typeLeaks(t.info)))
462
- leakingTypes(block.tpe)
454
+ block.tpe namedPartsWith (tp => locals.contains(tp.symbol))
463
455
}
464
456
465
457
/** 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