Skip to content

Commit

Permalink
Do not add dummy RHS to abstract inline methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki authored and little-inferno committed Jan 25, 2023
1 parent 8fcaaa3 commit 84dc13b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class PickleQuotes extends MacroTransform {
case _ =>
val (contents, tptWithHoles) = makeHoles(tpt)
PickleQuotes(quotes, tptWithHoles, contents, tpt.tpe, true)
case tree: DefDef if tree.symbol.is(Macro) || tree.symbol.isInlineMethod =>
case tree: DefDef if !tree.rhs.isEmpty && tree.symbol.isInlineMethod =>
// Shrink size of the tree. The methods have already been inlined.
// TODO move to FirstTransform to trigger even without quotes
cpy.DefDef(tree)(rhs = defaultValue(tree.rhs.tpe))
Expand Down

0 comments on commit 84dc13b

Please # to comment.