Skip to content

Commit f2cef0b

Browse files
committed
Keep erased implicit args
1 parent e467a03 commit f2cef0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,11 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
289289
tree.fun,
290290
tree.args.mapConserve(arg =>
291291
if (methType.isImplicitMethod && arg.span.isSynthetic)
292-
PruneErasedDefs.trivialErasedTree(arg)
292+
arg match
293+
case _: RefTree | _: Apply | _: TypeApply if arg.symbol.is(Erased) =>
294+
dropInlines.transform(arg)
295+
case _ =>
296+
PruneErasedDefs.trivialErasedTree(arg)
293297
else dropInlines.transform(arg)))
294298
else
295299
tree

0 commit comments

Comments
 (0)