aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-02-02 10:21:12 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-09 09:43:08 +0100
commitec4a3a0f4d0b8cccf636d1608896e7cafba9dec0 (patch)
tree9b732c1937b3d781b117a445a95c7f5e6ffb8bbf /src/dotty/tools/dotc/core/SymDenotations.scala
parentd34256c14a507dbdaea10bd83e8006cdafb9c799 (diff)
downloaddotty-ec4a3a0f4d0b8cccf636d1608896e7cafba9dec0.tar.gz
dotty-ec4a3a0f4d0b8cccf636d1608896e7cafba9dec0.tar.bz2
dotty-ec4a3a0f4d0b8cccf636d1608896e7cafba9dec0.zip
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.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala10
1 files changed, 1 insertions, 9 deletions
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.
*/