Skip to content

Commit c408f6f

Browse files
committed
Fix confusion between AppliedTypeTree and TypeApply
inferTypeParams should have generated an AppliedTypeTree, but it did generate a TypeApply instead.
1 parent 1a4060c commit c408f6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Inferencing.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ object Inferencing {
123123
def inferTypeParams(tree: Tree, pt: Type)(implicit ctx: Context): Tree = tree.tpe match {
124124
case tl: TypeLambda =>
125125
val (tl1, tvars) = constrained(tl, tree)
126-
val tree1 = tree.withType(tl1).appliedToTypeTrees(tvars)
126+
var tree1 = AppliedTypeTree(tree.withType(tl1), tvars)
127127
tree1.tpe <:< pt
128128
fullyDefinedType(tree1.tpe, "template parent", tree.pos)
129129
tree1

0 commit comments

Comments
 (0)