File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/dotty/tools/backend/jvm Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,15 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
270
270
271
271
272
272
def isQualifierSafeToElide (qual : Tree ): Boolean = tpd.isIdempotentExpr(qual)
273
+ def desugarIdent (i : Ident ): Option [Select ] = {
274
+ i.tpe match {
275
+ case TermRef (prefix : TermRef , name) =>
276
+ Some (tpd.ref(prefix).select(i.symbol))
277
+ case TermRef (prefix : ThisType , name) =>
278
+ Some (tpd.This (prefix.cls).select(i.symbol))
279
+ case _ => None
280
+ }
281
+ }
273
282
def getLabelDefOwners (tree : Tree ): Map [Tree , List [LabelDef ]] = {
274
283
// for each rhs of a defdef returns LabelDefs inside this DefDef
275
284
val res = new collection.mutable.HashMap [Tree , List [LabelDef ]]()
You can’t perform that action at this time.
0 commit comments