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:
146146 invokeCall(statementId, span)
147147
148148 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)
150150
151151 private def transformInnerApply (tree : Tree )(using Context ): Tree = tree match
152152 case a : Apply if a.fun.symbol == defn.StringContextModule_apply =>
@@ -164,6 +164,8 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
164164 case s : Select =>
165165 cpy.Select (s)(transformInnerApply(s.qualifier), s.name)
166166 case i : (Ident | This ) => i
167+ case t : Typed =>
168+ cpy.Typed (t)(transformInnerApply(t.expr), t.tpt)
167169 case other => transform(other)
168170
169171 private def allConstArgs (args : List [Tree ]) =
@@ -183,7 +185,7 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
183185
184186 // Transform args and fun, i.e. instrument them if needed (and if possible)
185187 val app =
186- if ( tree.fun.symbol eq defn.throwMethod) tree
188+ if tree.fun.symbol eq defn.throwMethod then tree
187189 else cpy.Apply (tree)(transformInnerApply(tree.fun), transformApplyArgs(tree.args))
188190
189191 if needsLift(tree) then
You can’t perform that action at this time.
0 commit comments