Skip to content

Commit d636e59

Browse files
committed
Remove incorrect special case for Inline purity checks
This special case was added two years ago, quoting from 5428549 "Inlined pure values are pure even if referenced from impure prefixes (i.e. prefix need not be evaluated)" This does not match the current semantics for inline where the prefix is always evaluated.
1 parent 13c91f4 commit d636e59

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
328328
case Ident(_) =>
329329
refPurity(tree)
330330
case Select(qual, _) =>
331-
refPurity(tree).min(
332-
if (tree.symbol.is(Inline)) Pure else exprPurity(qual))
331+
refPurity(tree).min(exprPurity(qual))
333332
case TypeApply(fn, _) =>
334333
exprPurity(fn)
335334
/*

0 commit comments

Comments
 (0)