From ec4a3a0f4d0b8cccf636d1608896e7cafba9dec0 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 2 Feb 2016 10:21:12 +0100 Subject: Big realizability refactoring Move logic from TypeOps to new file CheckRealizable.scala. Also check realizable fields under strict mode. Check at phase PostTyper rather than Typer to avoid cycles. New tests for imports and deep paths. --- src/dotty/tools/dotc/core/SymDenotations.scala | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala') diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index fb59cae59..a4082607c 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -12,6 +12,7 @@ import scala.reflect.io.AbstractFile import Decorators.SymbolIteratorDecorator import ast._ import annotation.tailrec +import CheckRealizable._ import typer.Mode import util.SimpleMap import util.Stats @@ -522,15 +523,6 @@ object SymDenotations { final def isStable(implicit ctx: Context) = isType || !is(UnstableValue, butNot = Stable) - /** Is this a denotation of a realizable term (or an arbitrary type)? */ - final def isRealizable(implicit ctx: Context) = - is(Stable) || isType || { - val isRealizable = - !isLateInitialized || - isEffectivelyFinal && ctx.realizability(info) == TypeOps.Realizable - isRealizable && { setFlag(Stable); true } - } - /** Field is initialized on use, not on definition; * we do not count modules as fields here. */ -- cgit v1.2.3