aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-12-02 22:53:12 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-12-16 13:15:02 +0100
commitf9d19cec82af03a0d51272c0959ce7a73810121b (patch)
tree33825fde41ae0e0f6339890afedc9be93e8401fa /src/dotty/tools/backend/jvm/DottyBackendInterface.scala
parent6509f593c4d8530612d9f8796638c270dbc7c8f9 (diff)
downloaddotty-f9d19cec82af03a0d51272c0959ce7a73810121b.tar.gz
dotty-f9d19cec82af03a0d51272c0959ce7a73810121b.tar.bz2
dotty-f9d19cec82af03a0d51272c0959ce7a73810121b.zip
implement isQualifierSafeToElide
Diffstat (limited to 'src/dotty/tools/backend/jvm/DottyBackendInterface.scala')
-rw-r--r--src/dotty/tools/backend/jvm/DottyBackendInterface.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index cd08600ce..75264b3ab 100644
--- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -267,7 +267,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
}.bits
- def isQualifierSafeToElide(qual: Tree): Boolean = false // todo: implement
+ def isQualifierSafeToElide(qual: Tree): Boolean = tpd.isIdempotentExpr(qual)
def getLabelDefOwners(tree: Tree): Map[Tree, List[LabelDef]] = {
// for each rhs of a defdef returns LabelDefs inside this DefDef
val res = new collection.mutable.HashMap[Tree, List[LabelDef]]()