aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-01 12:05:13 +1100
committerMartin Odersky <odersky@gmail.com>2017-02-01 12:05:13 +1100
commit12d11cb8c2c38f7eb1c50fb577717c75f6895f00 (patch)
tree4569b7723c5f19d2ad1ae9ea785a0d6d6ea35615 /compiler
parent62810e0ba681224c8288470a27e816b05769f01a (diff)
downloaddotty-12d11cb8c2c38f7eb1c50fb577717c75f6895f00.tar.gz
dotty-12d11cb8c2c38f7eb1c50fb577717c75f6895f00.tar.bz2
dotty-12d11cb8c2c38f7eb1c50fb577717c75f6895f00.zip
Drop atPhaseNotLaterThanTyper
It was used only once and its body is almost as short as the name, so no need to have a separate method.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Phases.scala3
-rw-r--r--compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala2
2 files changed, 1 insertions, 4 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Phases.scala b/compiler/src/dotty/tools/dotc/core/Phases.scala
index 6a53e1b30..d217afed8 100644
--- a/compiler/src/dotty/tools/dotc/core/Phases.scala
+++ b/compiler/src/dotty/tools/dotc/core/Phases.scala
@@ -40,9 +40,6 @@ trait Phases {
def atPhaseNotLaterThan[T](limit: Phase)(op: Context => T): T =
if (!limit.exists || phase <= limit) op(this) else atPhase(limit)(op)
- def atPhaseNotLaterThanTyper[T](op: Context => T): T =
- atPhaseNotLaterThan(base.typerPhase)(op)
-
def isAfterTyper: Boolean = base.isAfterTyper(phase)
}
diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
index 97a82e80d..5b751ef3c 100644
--- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
+++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
@@ -818,7 +818,7 @@ class ClassfileParser(
case Some(entry) =>
val outerName = entry.outerName.stripModuleClassSuffix
val owner = classSymbol(outerName)
- val result = ctx.atPhaseNotLaterThanTyper { implicit ctx =>
+ val result = ctx.atPhaseNotLaterThan(ctx.typerPhase) { implicit ctx =>
getMember(owner, innerName.toTypeName)
}
assert(result ne NoSymbol,