Skip to content

Fixes for transforms #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/dotty/tools/dotc/Run.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down
15 changes: 13 additions & 2 deletions src/dotty/tools/dotc/core/Denotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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
}
Expand Down