diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-14 13:37:12 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-03-14 13:37:12 +0100 |
commit | 3bdc44f8984a565583fa5f3170edd9146aec1d5b (patch) | |
tree | d08766ef7aeb060eb2949129651132b71fe6ff0d | |
parent | 8b2a63fa3ce33e271c5c8ba92253e4f412f18a9b (diff) | |
download | dotty-3bdc44f8984a565583fa5f3170edd9146aec1d5b.tar.gz dotty-3bdc44f8984a565583fa5f3170edd9146aec1d5b.tar.bz2 dotty-3bdc44f8984a565583fa5f3170edd9146aec1d5b.zip |
Reset frozen for transformed class denotations.
... so that we can add new members to transformed class denotations.
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 00b6815e7..b185d15bf 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -2,13 +2,17 @@ package dotty.tools package dotc package core -import SymDenotations.{ SymDenotation, NoDenotation } +import SymDenotations.{ SymDenotation, ClassDenotation, NoDenotation } import Contexts.{Context, ContextBase} import Names.{Name, PreName} import Names.TypeName import Symbols.NoSymbol import Symbols._ -import Types._, Periods._, Flags._, Transformers._, Decorators._ +import Types._ +import Periods._ +import Flags._ +import Transformers._ +import Decorators._ import transform.Erasure import printing.Texts._ import printing.Printer @@ -185,6 +189,9 @@ object Denotations { def requiredMethod(name: PreName)(implicit ctx: Context): TermSymbol = info.member(name.toTermName).requiredSymbol(_ is Method).asTerm + def requiredValue(name: PreName)(implicit ctx: Context): TermSymbol = + info.member(name.toTermName).requiredSymbol(_.info.isParameterless).asTerm + /** The denotation that has a type matching `targetType` when seen * as a member of type `site`, `NoDenotation` if none exists. */ @@ -514,6 +521,10 @@ object Denotations { if (next eq cur) startPid = cur.validFor.firstPhaseId else { + next match { + case next: ClassDenotation => next.resetFlag(Frozen) + case _ => + } cur.nextInRun = next cur = next } |