Skip to content

Commit 5a3de60

Browse files
authored
Merge branch 'main' into fix/1117-snapshot-worker-strip-types
2 parents d708610 + a029d43 commit 5a3de60

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/parsers/julia.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)