From eb95a04d8d7741ee392df9de05a4040a0f3535ca Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Fri, 23 Sep 2016 16:30:20 +0200 Subject: Remove incorrect special case for Inline purity checks This special case was added two years ago, quoting from 5428549a57b710b11e57aab4eee24e9b89b8b97c "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. --- src/dotty/tools/dotc/ast/TreeInfo.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/ast/TreeInfo.scala') diff --git a/src/dotty/tools/dotc/ast/TreeInfo.scala b/src/dotty/tools/dotc/ast/TreeInfo.scala index a6c49cffd..bf375acde 100644 --- a/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -329,8 +329,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] => case Ident(_) => refPurity(tree) case Select(qual, _) => - refPurity(tree).min( - if (tree.symbol.is(Inline)) Pure else exprPurity(qual)) + refPurity(tree).min(exprPurity(qual)) case TypeApply(fn, _) => exprPurity(fn) /* -- cgit v1.2.3