Skip to content

Commit 01a5dd4

Browse files
Do not add dummy RHS to abstract inline methods (#16510)
Fixes #16508
2 parents f6f8a29 + 77910e8 commit 01a5dd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class PickleQuotes extends MacroTransform {
113113
case _ =>
114114
val (contents, tptWithHoles) = makeHoles(tpt)
115115
PickleQuotes(quotes, tptWithHoles, contents, tpt.tpe, true)
116-
case tree: DefDef if tree.symbol.is(Macro) || tree.symbol.isInlineMethod =>
116+
case tree: DefDef if !tree.rhs.isEmpty && tree.symbol.isInlineMethod =>
117117
// Shrink size of the tree. The methods have already been inlined.
118118
// TODO move to FirstTransform to trigger even without quotes
119119
cpy.DefDef(tree)(rhs = defaultValue(tree.rhs.tpe))

0 commit comments

Comments
 (0)