Skip to content

Commit ea68953

Browse files
committed
Inline trees can be pure
Need to be handled like blocks for determining their purity.
1 parent e773e7b commit ea68953

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
372372
exprPurity(expr)
373373
case Block(stats, expr) =>
374374
minOf(exprPurity(expr), stats.map(statPurity))
375+
case Inlined(_, bindings, expr) =>
376+
minOf(exprPurity(expr), bindings.map(statPurity))
375377
case NamedArg(_, expr) =>
376378
exprPurity(expr)
377379
case _ =>

0 commit comments

Comments
 (0)