Skip to content

Commit c084742

Browse files
committed
Avoid retype checking ident
1 parent 4d79205 commit c084742

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,9 +1071,11 @@ class Typer extends Namer
10711071
*/
10721072
lazy val calleeType: Type = untpd.stripAnnotated(fnBody) match {
10731073
case ident: untpd.Ident if isContextual =>
1074-
val tp = typedIdent(ident, WildcardType).tpe.widen
1074+
val ident1 = typedIdent(ident, WildcardType)
1075+
val tp = ident1.tpe.widen
10751076
if defn.isContextFunctionType(tp) && params.size == defn.functionArity(tp) then
10761077
paramIndex = params.map(_.name).zipWithIndex.toMap
1078+
fnBody = untpd.TypedSplice(ident1)
10771079
tp.select(nme.apply)
10781080
else NoType
10791081
case app @ Apply(expr, args) =>

0 commit comments

Comments
 (0)