Skip to content

Commit 0e2041a

Browse files
committed
Add documentation for MacroAnnotations::enterMissingSymbols
1 parent 8018590 commit 0e2041a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ class MacroAnnotations(phase: IdentityDenotTransformer):
134134
else if annotated.isClass && annotated.owner.is(Package) /*&& !sym.isClass*/ then
135135
report.error(i"macro annotation can not add top-level ${sym.showKind}. $annot tried to add $sym.", annot.tree)
136136

137+
/**
138+
* Enter the symbols generated by MacroAnnotations
139+
*/
137140
private def enterMissingSymbols(tree: DefTree)(using Context) = new TreeTraverser {
138141
def traverse(tree: tpd.Tree)(using Context): Unit = tree match
139142
case tdef @ TypeDef(_, template: Template) =>
140-
//for tree <- template.constr :: template.body do
141143
val isSymbolInDecls = tdef.symbol.asClass.info.decls.toList.toSet
142144
for tree <- template.body do
143145
if tree.symbol.owner != tdef.symbol then

0 commit comments

Comments
 (0)