Skip to content

Commit 60824de

Browse files
committed
implement isQualifierSafeToElide
1 parent 6c66264 commit 60824de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
267267
}.bits
268268

269269

270-
def isQualifierSafeToElide(qual: Tree): Boolean = false // todo: implement
270+
def isQualifierSafeToElide(qual: Tree): Boolean = tpd.isIdempotentExpr(qual)
271271
def getLabelDefOwners(tree: Tree): Map[Tree, List[LabelDef]] = {
272272
// for each rhs of a defdef returns LabelDefs inside this DefDef
273273
val res = new collection.mutable.HashMap[Tree, List[LabelDef]]()

0 commit comments

Comments
 (0)