Skip to content

Commit eb95a04

Browse files
smarterodersky
authored andcommitted
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 53b165e commit eb95a04

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
@@ -329,8 +329,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
329329
case Ident(_) =>
330330
refPurity(tree)
331331
case Select(qual, _) =>
332-
refPurity(tree).min(
333-
if (tree.symbol.is(Inline)) Pure else exprPurity(qual))
332+
refPurity(tree).min(exprPurity(qual))
334333
case TypeApply(fn, _) =>
335334
exprPurity(fn)
336335
/*

0 commit comments

Comments
 (0)