aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-11-29 16:45:55 +0100
committerMartin Odersky <odersky@gmail.com>2013-11-29 16:45:55 +0100
commitb508185cc3fe5c740d5ff6ecfd0dc1482596018b (patch)
tree8f647883784d3399ebf690eeab180c0271b7c752 /src/dotty/tools/dotc/typer/Applications.scala
parent6dabcdaabf49ecc72468c6e712d6bc5c927ec87e (diff)
downloaddotty-b508185cc3fe5c740d5ff6ecfd0dc1482596018b.tar.gz
dotty-b508185cc3fe5c740d5ff6ecfd0dc1482596018b.tar.bz2
dotty-b508185cc3fe5c740d5ff6ecfd0dc1482596018b.zip
Tweaks to Inferencing
Also: Making VarianceMap a SimpleMap for replayability
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 901d44800..648266a7a 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -101,7 +101,7 @@ trait Applications extends Compatibility { self: Typer =>
*/
val methType = funType.widen match {
case funType: MethodType => funType
- case funType: PolyType => ctx.track(funType).resultType
+ case funType: PolyType => constrained(funType).resultType
case _ => funType
}
@@ -594,8 +594,8 @@ trait Applications extends Compatibility { self: Typer =>
println(i"case 1 $unapplyArgType ${ctx.typerState.constraint}")
pt
}
- else if (unapplyArgType <:< widenForSelector(pt)) {
- ctx.maximizeType(unapplyArgType) match {
+ else if (unapplyArgType <:< widenForMatchSelector(pt)) {
+ maximizeType(unapplyArgType) match {
case Some(tvar) =>
def msg =
i"""There is no best instantiation of pattern type $unapplyArgType
@@ -705,7 +705,7 @@ trait Applications extends Compatibility { self: Typer =>
tp2 match {
case tp2: PolyType =>
assert(!ctx.typerState.isCommittable)
- isAsSpecific(alt1, tp1, alt2, ctx.track(tp2).resultType)
+ isAsSpecific(alt1, tp1, alt2, constrained(tp2).resultType)
case _ =>
testCompatible(tp1, tp2)(ctx)
}