diff options
author | Dmitry Petrashko <dark@d-d.me> | 2014-03-14 13:45:56 +0100 |
---|---|---|
committer | Dmitry Petrashko <dark@d-d.me> | 2014-03-14 13:45:56 +0100 |
commit | 6a97264962f9e50565a18ba68669c32ca29e90f4 (patch) | |
tree | 2b3f43e3f5e18adb5d5549695baefc2888f0f0e2 /src | |
parent | 8be53e728408f6d546a7fe990af9cd5e99db6250 (diff) | |
parent | 3bdc44f8984a565583fa5f3170edd9146aec1d5b (diff) | |
download | dotty-6a97264962f9e50565a18ba68669c32ca29e90f4.tar.gz dotty-6a97264962f9e50565a18ba68669c32ca29e90f4.tar.bz2 dotty-6a97264962f9e50565a18ba68669c32ca29e90f4.zip |
Merge pull request #71 from odersky/fixes-for-transforms
Fixes for transforms
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/Run.scala | 6 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 15 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index df7f433f9..160390c4f 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -30,8 +30,10 @@ class Run(comp: Compiler)(implicit ctx: Context) { def compileSources(sources: List[SourceFile]) = Stats.monitorHeartBeat { if (sources forall (_.exists)) { units = sources map (new CompilationUnit(_)) - for (phase <- ctx.allPhases) - phase.runOn(units) + for (phase <- ctx.allPhases) { + if (!ctx.reporter.hasErrors) + phase.runOn(units) + } } } 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 } |