diff options
author | Martin Odersky <odersky@gmail.com> | 2014-02-06 18:40:09 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-02-06 18:42:54 +0100 |
commit | ab62ca99a31ccd1984b875f7040b430bfccc2724 (patch) | |
tree | 202e07d6d74068767d40ec958dd434d5e34bd8ce /src/dotty/tools/dotc/core/Phases.scala | |
parent | 56a11807feaa00f81504925a5b95ebf7b8dab689 (diff) | |
download | dotty-ab62ca99a31ccd1984b875f7040b430bfccc2724.tar.gz dotty-ab62ca99a31ccd1984b875f7040b430bfccc2724.tar.bz2 dotty-ab62ca99a31ccd1984b875f7040b430bfccc2724.zip |
Checking for already existing symbols before creating new ones.
Otherwise we get spurious "compiled twice" errors on every symbol defined in a run after the first one.
Also, fixed a bug so that now run ids are correctly incremented.
Diffstat (limited to 'src/dotty/tools/dotc/core/Phases.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Phases.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Phases.scala b/src/dotty/tools/dotc/core/Phases.scala index 7979d3c58..72ebc7129 100644 --- a/src/dotty/tools/dotc/core/Phases.scala +++ b/src/dotty/tools/dotc/core/Phases.scala @@ -12,7 +12,7 @@ trait Phases { self: Context => if ((this eq NoContext) || !phase.exists) Nil else phase :: outersIterator.dropWhile(_.phase == phase).next.phasesStack - /** Execute `op` at given phase id */ + /** Execute `op` at given phase */ def atPhase[T](phase: Phase)(op: Context => T): T = atPhase(phase.id)(op) @@ -92,7 +92,7 @@ object Phases { } } - final def <= (that: Phase)(implicit ctx: Context) = + final def <= (that: Phase)(implicit ctx: Context) = exists && id <= that.id final def prev(implicit ctx: Context): Phase = |