aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-02 22:09:34 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-02 22:09:34 +0100
commitdeb82d52d9cc65270e92a9298ef35943afee0eba (patch)
tree7fda99d247658238f6582414256fc6c3f354bd0c /src/dotty/tools/dotc/typer/Applications.scala
parent13fd9ffd6718e201ee579da332668d94dca60600 (diff)
downloaddotty-deb82d52d9cc65270e92a9298ef35943afee0eba.tar.gz
dotty-deb82d52d9cc65270e92a9298ef35943afee0eba.tar.bz2
dotty-deb82d52d9cc65270e92a9298ef35943afee0eba.zip
Refactoring test compatible.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 2d04f7ec1..2519b9a72 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -666,10 +666,6 @@ trait Applications extends Compatibility { self: Typer =>
app.exists && app.hasAltWith(d => isApplicable(TermRef(tp, nme.apply).withDenot(d), args, resultType))
}
- /** Is `tp` a subtype of `pt`? */
- def testCompatible(tp: Type, pt: Type)(implicit ctx: Context) =
- isCompatible(tp, pt)(ctx.fresh.withExploreTyperState)
-
/** In a set of overloaded applicable alternatives, is `alt1` at least as good as
* `alt2`? `alt1` and `alt2` are nonoverloaded references.
*/
@@ -700,7 +696,7 @@ trait Applications extends Compatibility { self: Typer =>
assert(!ctx.typerState.isCommittable)
isAsSpecific(alt1, tp1, alt2, constrained(tp2).resultType)
case _ =>
- testCompatible(tp1, tp2)(ctx)
+ isCompatible(tp1, tp2)
}
}
@@ -833,7 +829,7 @@ trait Applications extends Compatibility { self: Typer =>
narrowByTypes(alts, args, resultType)
case pt =>
- alts filter (alt => testCompatible(normalize(alt), pt))
+ alts filter (normalizedCompatible(_, pt))
}
if (isDetermined(candidates)) candidates