diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-09-23 16:30:20 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:12:28 +0200 |
commit | eb95a04d8d7741ee392df9de05a4040a0f3535ca (patch) | |
tree | 0bece59c7e185155f7aabacbc1df7fc63bd14d16 /src/dotty | |
parent | 53b165e69bb45f424184d02e76c520b67ee0c1d7 (diff) | |
download | dotty-eb95a04d8d7741ee392df9de05a4040a0f3535ca.tar.gz dotty-eb95a04d8d7741ee392df9de05a4040a0f3535ca.tar.bz2 dotty-eb95a04d8d7741ee392df9de05a4040a0f3535ca.zip |
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.
Diffstat (limited to 'src/dotty')
-rw-r--r-- | src/dotty/tools/dotc/ast/TreeInfo.scala | 3 |
1 files changed, 1 insertions, 2 deletions
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) /* |