Skip to content

Commit fc2ca4b

Browse files
committed
Desugar: Mark label defs as Synthetic
This way they won't show up in the IDE
1 parent 13a4927 commit fc2ca4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ object desugar {
778778
/** { label def lname(): Unit = rhs; call }
779779
*/
780780
def labelDefAndCall(lname: TermName, rhs: Tree, call: Tree) = {
781-
val ldef = DefDef(lname, Nil, ListOfNil, TypeTree(defn.UnitType), rhs).withFlags(Label)
781+
val ldef = DefDef(lname, Nil, ListOfNil, TypeTree(defn.UnitType), rhs).withFlags(Label | Synthetic)
782782
Block(ldef, call)
783783
}
784784

0 commit comments

Comments
 (0)