diff options
Diffstat (limited to 'src/dotty/tools/dotc/ast/CheckTrees.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/CheckTrees.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/ast/CheckTrees.scala b/src/dotty/tools/dotc/ast/CheckTrees.scala index 1fae0a1f1..832544706 100644 --- a/src/dotty/tools/dotc/ast/CheckTrees.scala +++ b/src/dotty/tools/dotc/ast/CheckTrees.scala @@ -6,6 +6,7 @@ import core._ import util.Positions._, Types._, Contexts._, Constants._, Names._, Flags._ import SymDenotations._, Symbols._, StdNames._, Annotations._, Trees._ +// TODO: revise, integrate in a checking phase. object CheckTrees { import tpd._ @@ -19,7 +20,7 @@ object CheckTrees { def escapingRefs(block: Block)(implicit ctx: Context): collection.Set[NamedType] = { var hoisted: Set[Symbol] = Set() - lazy val locals = localSyms(block.stats).toSet + lazy val locals = ctx.typeAssigner.localSyms(block.stats).toSet def isLocal(sym: Symbol): Boolean = (locals contains sym) && !isHoistableClass(sym) def isHoistableClass(sym: Symbol) = @@ -177,7 +178,7 @@ object CheckTrees { checkRefinements(forbidden - rsym, rs1) case nil => } - checkRefinements(localSyms(refinements).toSet, refinements) + checkRefinements(ctx.typeAssigner.localSyms(refinements).toSet, refinements) case AppliedTypeTree(tpt, args) => check(tpt.isValueType) val tparams = tpt.tpe.typeParams |