Skip to content

Commit 3bdc44f

Browse files
committed
Reset frozen for transformed class denotations.
... so that we can add new members to transformed class denotations.
1 parent 8b2a63f commit 3bdc44f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ package dotty.tools
22
package dotc
33
package core
44

5-
import SymDenotations.{ SymDenotation, NoDenotation }
5+
import SymDenotations.{ SymDenotation, ClassDenotation, NoDenotation }
66
import Contexts.{Context, ContextBase}
77
import Names.{Name, PreName}
88
import Names.TypeName
99
import Symbols.NoSymbol
1010
import Symbols._
11-
import Types._, Periods._, Flags._, Transformers._, Decorators._
11+
import Types._
12+
import Periods._
13+
import Flags._
14+
import Transformers._
15+
import Decorators._
1216
import transform.Erasure
1317
import printing.Texts._
1418
import printing.Printer
@@ -185,6 +189,9 @@ object Denotations {
185189
def requiredMethod(name: PreName)(implicit ctx: Context): TermSymbol =
186190
info.member(name.toTermName).requiredSymbol(_ is Method).asTerm
187191

192+
def requiredValue(name: PreName)(implicit ctx: Context): TermSymbol =
193+
info.member(name.toTermName).requiredSymbol(_.info.isParameterless).asTerm
194+
188195
/** The denotation that has a type matching `targetType` when seen
189196
* as a member of type `site`, `NoDenotation` if none exists.
190197
*/
@@ -514,6 +521,10 @@ object Denotations {
514521
if (next eq cur)
515522
startPid = cur.validFor.firstPhaseId
516523
else {
524+
next match {
525+
case next: ClassDenotation => next.resetFlag(Frozen)
526+
case _ =>
527+
}
517528
cur.nextInRun = next
518529
cur = next
519530
}

0 commit comments

Comments
 (0)