diff --git a/gitnexus/src/core/ingestion/tree-sitter-queries.ts b/gitnexus/src/core/ingestion/tree-sitter-queries.ts index a96c23ff6..d11201b39 100644 --- a/gitnexus/src/core/ingestion/tree-sitter-queries.ts +++ b/gitnexus/src/core/ingestion/tree-sitter-queries.ts @@ -1148,10 +1148,12 @@ export const DART_QUERIES = ` (selector (argument_part))) @call ; ── Calls: await method chain (await obj.method()) ─────────────────────────── +; Requires argument_part to distinguish method calls from field access (await obj.field) (await_expression (selector (unconditional_assignable_selector - (identifier) @call.name))) @call + (identifier) @call.name)) + (selector (argument_part))) @call ; ── Calls: named argument (foo(child: buildX())) ───────────────────────────── (named_argument @@ -1166,11 +1168,14 @@ export const DART_QUERIES = ` (selector (argument_part))) @call ; ── Calls: cascade (obj..add(x)..sort()) ───────────────────────────────────── +; Note: cascade_selector contains identifier directly (no unconditional_assignable_selector +; wrapper in Dart grammar), so inferCallForm() classifies these as free calls rather than +; member calls. Cross-file resolution still benefits from the call being recorded. (cascade_section (cascade_selector (identifier) @call.name) (argument_part)) @call -; ── Calls: static/const field initializers (const _svc = MyService()) ──────── +; ── Calls: static final field initializers (static final _svc = MyService()) ── (static_final_declaration (identifier) @call.name . diff --git a/gitnexus/test/integration/query-compilation.test.ts b/gitnexus/test/integration/query-compilation.test.ts index d0fd038a7..6652a59bf 100644 --- a/gitnexus/test/integration/query-compilation.test.ts +++ b/gitnexus/test/integration/query-compilation.test.ts @@ -33,6 +33,7 @@ describe('Query compilation smoke tests', () => { [SupportedLanguages.PHP]: 'test.php', [SupportedLanguages.Kotlin]: 'Test.kt', [SupportedLanguages.Swift]: 'test.swift', + [SupportedLanguages.Dart]: 'test.dart', }; // Known query compilation failures — remove from this set as PRs fix them