aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/TreeInfo.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-01 14:44:49 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-01 14:45:00 +0100
commitc2127130f5b1534d49d2ec07b9bd4f83bffe9d0a (patch)
tree7484c9524913472d93bec5ad9d93c857722c12fb /src/dotty/tools/dotc/ast/TreeInfo.scala
parent16104754c964b49bf4bd06ea81a00f276eefae0d (diff)
downloaddotty-c2127130f5b1534d49d2ec07b9bd4f83bffe9d0a.tar.gz
dotty-c2127130f5b1534d49d2ec07b9bd4f83bffe9d0a.tar.bz2
dotty-c2127130f5b1534d49d2ec07b9bd4f83bffe9d0a.zip
Polishing EtaExpansion
Some code simplification + a change where non-idempotent Selects in function prefix position are now lifted as a whole (previously, only the prefix was lifted).
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 ed9b1b81a..c2877a814 100644
--- a/src/dotty/tools/dotc/ast/TreeInfo.scala
+++ b/src/dotty/tools/dotc/ast/TreeInfo.scala
@@ -305,7 +305,7 @@ trait TypedTreeInfo extends TreeInfo[Type] {self: Trees.Instance[Type] =>
false
}
- private def isIdempotentRef(tree: tpd.Tree)(implicit ctx: Context) =
+ def isIdempotentRef(tree: tpd.Tree)(implicit ctx: Context) =
tree.symbol.isStable || !tree.tpe.widen.isParameterless
/** Is symbol potentially a getter of a mutable variable?