Skip to content

Commit ac79f4c

Browse files
committed
Avoid constructing typed tree with untyped arguments
1 parent 6224c1e commit ac79f4c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
720720
}
721721

722722
fun1.tpe match {
723-
case err: ErrorType => untpd.cpy.Apply(tree)(fun1, tree.args).withType(err)
723+
case err: ErrorType => untpd.cpy.Apply(tree)(fun1, proto.typedArgs).withType(err)
724724
case TryDynamicCallType => typedDynamicApply(tree, pt)
725725
case _ =>
726726
if (originalProto.isDropped) fun1

tests/neg/parser-stability-6.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class x0 {
2+
1 + x1 * / |= 2 // error: not found: x1
3+
}

0 commit comments

Comments
 (0)