aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-05-20 10:27:57 +0200
committerMartin Odersky <odersky@gmail.com>2016-05-23 12:01:39 +0200
commit67d5660e0be6f0ae411b8fea030acd92a7b27cbf (patch)
treef74edb62b060d18b4cc9feeaf9952f6ad982cf95 /src/dotty/tools/dotc/core/Symbols.scala
parent1ab71ca9b2db9d2219b23837df4c27723773738b (diff)
downloaddotty-67d5660e0be6f0ae411b8fea030acd92a7b27cbf.tar.gz
dotty-67d5660e0be6f0ae411b8fea030acd92a7b27cbf.tar.bz2
dotty-67d5660e0be6f0ae411b8fea030acd92a7b27cbf.zip
Don't force a symbol's denotation for isTerm/isType
Forcing it led to CyclicReferences involving RefChecks.OptLevelInfo when compiling dotc/*.scala against Tasty files. The problem was that when transforming OptLevelInfo the backend forced a transformInfo of RefChecks in TypeErasure which filtered RefCheck's scope to eliminate non-class type definitions. Without the tweak in this commit this tried to make all symbols current, and so came back to OptLevelInfo.
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index d40acdfa7..b9458b133 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -398,10 +398,10 @@ object Symbols {
/** Subclass tests and casts */
final def isTerm(implicit ctx: Context): Boolean =
- (if(isDefinedInCurrentRun) lastDenot else denot).isTerm
+ (if (defRunId == ctx.runId) lastDenot else denot).isTerm
final def isType(implicit ctx: Context): Boolean =
- (if(isDefinedInCurrentRun) lastDenot else denot).isType
+ (if (defRunId == ctx.runId) lastDenot else denot).isType
final def isClass: Boolean = isInstanceOf[ClassSymbol]