Skip to content

Commit 116fdfc

Browse files
committed
not subst dummyArg if tree is TypedSlice
1 parent 5ec51bc commit 116fdfc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4259,7 +4259,13 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
42594259
val tm = new TypeMap:
42604260
def apply(t: Type) = t match
42614261
case fp@FunProto(args, resType) =>
4262-
fp.derivedFunProto(args.map(a => dummyArg(a.typeOpt).withSpan(a.span)), mapOver(resType))
4262+
fp.derivedFunProto(
4263+
args.map(arg =>
4264+
if(arg.isInstanceOf[untpd.TypedSplice]) arg
4265+
else dummyArg(arg.typeOpt).withSpan(arg.span)
4266+
),
4267+
mapOver(resType)
4268+
)
42634269
case _ =>
42644270
mapOver(t)
42654271
val resultAlreadyConstrained = pt1.isInstanceOf[MethodOrPoly]

0 commit comments

Comments
 (0)