Skip to content

Commit 6a97264

Browse files
committed
Merge pull request #71 from odersky/fixes-for-transforms
Fixes for transforms
2 parents 8be53e7 + 3bdc44f commit 6a97264

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/dotty/tools/dotc/Run.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ class Run(comp: Compiler)(implicit ctx: Context) {
3030
def compileSources(sources: List[SourceFile]) = Stats.monitorHeartBeat {
3131
if (sources forall (_.exists)) {
3232
units = sources map (new CompilationUnit(_))
33-
for (phase <- ctx.allPhases)
34-
phase.runOn(units)
33+
for (phase <- ctx.allPhases) {
34+
if (!ctx.reporter.hasErrors)
35+
phase.runOn(units)
36+
}
3537
}
3638
}
3739

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)