aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-19 19:04:03 +0100
committerMartin Odersky <odersky@gmail.com>2017-04-06 13:15:29 +0200
commit15e60e8637887892b0c03e5f6948f1222819a746 (patch)
treec159c408a26025212d77baac11971291101d9870 /compiler/src/dotty/tools/dotc/typer
parent8d33ca7460493427055daaecca53c66127772831 (diff)
downloaddotty-15e60e8637887892b0c03e5f6948f1222819a746.tar.gz
dotty-15e60e8637887892b0c03e5f6948f1222819a746.tar.bz2
dotty-15e60e8637887892b0c03e5f6948f1222819a746.zip
Narrow matches from TypeLambda to HKTypeLambda where appropriate
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Inferencing.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Inferencing.scala b/compiler/src/dotty/tools/dotc/typer/Inferencing.scala
index 48da9f35f..632dbff76 100644
--- a/compiler/src/dotty/tools/dotc/typer/Inferencing.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -121,9 +121,9 @@ object Inferencing {
/** If `tree` has a type lambda type, infer its type parameters by comparing with expected type `pt` */
def inferTypeParams(tree: Tree, pt: Type)(implicit ctx: Context): Tree = tree.tpe match {
- case poly: TypeLambda =>
- val (poly1, tvars) = constrained(poly, tree)
- val tree1 = tree.withType(poly1).appliedToTypeTrees(tvars)
+ case tl: TypeLambda =>
+ val (tl1, tvars) = constrained(tl, tree)
+ val tree1 = tree.withType(tl1).appliedToTypeTrees(tvars)
tree1.tpe <:< pt
fullyDefinedType(tree1.tpe, "template parent", tree.pos)
tree1