File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
146
146
invokeCall(statementId, span)
147
147
148
148
private def transformApplyArgs (trees : List [Tree ])(using Context ): List [Tree ] =
149
- if ( allConstArgs(trees)) trees else transform(trees)
149
+ if allConstArgs(trees) then trees else transform(trees)
150
150
151
151
private def transformInnerApply (tree : Tree )(using Context ): Tree = tree match
152
152
case a : Apply if a.fun.symbol == defn.StringContextModule_apply =>
@@ -164,6 +164,8 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
164
164
case s : Select =>
165
165
cpy.Select (s)(transformInnerApply(s.qualifier), s.name)
166
166
case i : (Ident | This ) => i
167
+ case t : Typed =>
168
+ cpy.Typed (t)(transformInnerApply(t.expr), t.tpt)
167
169
case other => transform(other)
168
170
169
171
private def allConstArgs (args : List [Tree ]) =
@@ -183,7 +185,7 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
183
185
184
186
// Transform args and fun, i.e. instrument them if needed (and if possible)
185
187
val app =
186
- if ( tree.fun.symbol eq defn.throwMethod) tree
188
+ if tree.fun.symbol eq defn.throwMethod then tree
187
189
else cpy.Apply (tree)(transformInnerApply(tree.fun), transformApplyArgs(tree.args))
188
190
189
191
if needsLift(tree) then
You can’t perform that action at this time.
0 commit comments