aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-14 13:37:12 +0100
committerMartin Odersky <odersky@gmail.com>2014-03-14 13:37:12 +0100
commit3bdc44f8984a565583fa5f3170edd9146aec1d5b (patch)
treed08766ef7aeb060eb2949129651132b71fe6ff0d /src/dotty/tools/dotc/core/Denotations.scala
parent8b2a63fa3ce33e271c5c8ba92253e4f412f18a9b (diff)
downloaddotty-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.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala15
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
}