aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/TreeInfo.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-01 13:36:05 +0200
committerGuillaume Martres <smarter@ubuntu.com>2015-04-01 17:54:38 +0200
commitccf3951b5fa7dde2c5aa08eb192024c740ec9697 (patch)
treeaa05b68710f0875ca22fb96b38966f49ebb8ece1 /src/dotty/tools/dotc/ast/TreeInfo.scala
parent8b704feb57a14b04557b81f5274d5f06c5b2a09c (diff)
downloaddotty-ccf3951b5fa7dde2c5aa08eb192024c740ec9697.tar.gz
dotty-ccf3951b5fa7dde2c5aa08eb192024c740ec9697.tar.bz2
dotty-ccf3951b5fa7dde2c5aa08eb192024c740ec9697.zip
Fix refPurity: was using wrong function to detect if term is stable.
Diffstat (limited to 'src/dotty/tools/dotc/ast/TreeInfo.scala')
-rw-r--r--src/dotty/tools/dotc/ast/TreeInfo.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/TreeInfo.scala b/src/dotty/tools/dotc/ast/TreeInfo.scala
index 0abd25f51..1bb0e0f4f 100644
--- a/src/dotty/tools/dotc/ast/TreeInfo.scala
+++ b/src/dotty/tools/dotc/ast/TreeInfo.scala
@@ -343,7 +343,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
*/
private def refPurity(tree: tpd.Tree)(implicit ctx: Context): PurityLevel =
if (!tree.tpe.widen.isParameterless) Pure
- else if (!tree.symbol.is(Stable)) Impure
+ else if (!tree.symbol.isStable) Impure
else if (tree.symbol.is(Lazy)) Idempotent // TODO add Module flag, sinxce Module vals or not Lazy from the start.
else Pure