diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-01 13:36:05 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2015-04-01 17:54:38 +0200 |
commit | ccf3951b5fa7dde2c5aa08eb192024c740ec9697 (patch) | |
tree | aa05b68710f0875ca22fb96b38966f49ebb8ece1 /src/dotty/tools/dotc/ast/TreeInfo.scala | |
parent | 8b704feb57a14b04557b81f5274d5f06c5b2a09c (diff) | |
download | dotty-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.scala | 2 |
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 |