aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-02-09 13:25:46 +0100
committerMartin Odersky <odersky@gmail.com>2014-02-09 13:25:46 +0100
commit9ceedf229de878dc7e6fc485dc11f9f92af8fe1c (patch)
tree02c55b1bbb45e380d95998e899f83c12afb9ce73 /src
parent2935c4fc45497a43f76a6eaacef427748f4ab501 (diff)
downloaddotty-9ceedf229de878dc7e6fc485dc11f9f92af8fe1c.tar.gz
dotty-9ceedf229de878dc7e6fc485dc11f9f92af8fe1c.tar.bz2
dotty-9ceedf229de878dc7e6fc485dc11f9f92af8fe1c.zip
Skolems are permanent, but not packages.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index f4ec2f431..e66f3b190 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -240,7 +240,7 @@ trait Symbols { this: Context =>
tparams
}
- def newSkolem(tp: Type) = newSymbol(defn.RootClass, nme.SKOLEM, SyntheticArtifact | ValidForever, tp)
+ def newSkolem(tp: Type) = newSymbol(defn.RootClass, nme.SKOLEM, SyntheticArtifact | Permanent, tp)
def newErrorSymbol(owner: Symbol, name: Name) =
newSymbol(owner, name, SyntheticArtifact,
@@ -320,12 +320,14 @@ object Symbols {
/** The current denotation of this symbol */
final def denot(implicit ctx: Context): SymDenotation = {
var denot = lastDenot
- if (!(denot.validFor contains ctx.period))
+ if (!(denot.validFor contains ctx.period)) {
denot = denot.current.asInstanceOf[SymDenotation]
+ lastDenot = denot
+ }
denot
}
- private def defRunId: RunId =
+ private[core] def defRunId: RunId =
if (lastDenot == null) NoRunId else lastDenot.validFor.runId
/** Does this symbol come from a currently compiled source file? */