Skip to content

Commit e33c632

Browse files
committed
Fix needsInlining condition for inline val rhs check
1 parent 4cb4bbb commit e33c632

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
338338
)
339339
}
340340
case tree: ValDef =>
341+
if tree.symbol.is(Inline, butNot = Param) then
342+
ctx.compilationUnit.needsInlining = true
341343
val tree1 = cpy.ValDef(tree)(rhs = normalizeErasedRhs(tree.rhs, tree.symbol))
342344
processValOrDefDef(super.transform(tree1))
343345
case tree: DefDef =>

0 commit comments

Comments
 (0)