Skip to content

Commit

Permalink
Add documentation for MacroAnnotations::enterMissingSymbols
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal committed Nov 8, 2023
1 parent 8018590 commit 0e2041a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@ class MacroAnnotations(phase: IdentityDenotTransformer):
else if annotated.isClass && annotated.owner.is(Package) /*&& !sym.isClass*/ then
report.error(i"macro annotation can not add top-level ${sym.showKind}. $annot tried to add $sym.", annot.tree)

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

0 comments on commit 0e2041a

Please sign in to comment.