File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,6 +152,18 @@ end`);
152152 expect ( callNames ) . toContain ( 'println' ) ;
153153 } ) ;
154154
155+ it ( 'does not record macro signature as call' , ( ) => {
156+ // Mirrors the function-signature guard for the `macro_definition`
157+ // grandparent branch. Without it, the macro name (`mymac`) would be
158+ // recorded as both a definition and a call.
159+ const symbols = parseJulia ( `macro mymac(x)
160+ println(x)
161+ end` ) ;
162+ const callNames = symbols . calls . map ( ( c ) => c . name ) ;
163+ expect ( callNames ) . not . toContain ( 'mymac' ) ;
164+ expect ( callNames ) . toContain ( 'println' ) ;
165+ } ) ;
166+
155167 it ( 'selected_import handles qualified module' , ( ) => {
156168 // `import Foo.Bar: baz` — module is a scoped_identifier. The import
157169 // must record `Foo.Bar` as the source and `baz` as the imported name,
You can’t perform that action at this time.
0 commit comments