Repository navigation
Description
Context
Follow-up from #2071 (which fixed the two largest dart func_start false-positive bug classes:
switch-expression arms and naive non-balanced-paren matching on calls-with-lambda-arguments).
After that fix, a full corpus name-diff (language-crucible/data/dart, via
tri_comparison_gatherer.gather_language("dart")) still shows 12 missing_from_gg (recall gaps)
and 6 extra_in_gg (remaining false positives) across the 7-file Flutter corpus. None of these are
individually as high-impact as #2071's fixes, and at least one (the class-header case) has a
proven-unsafe naive fix, so they're better tracked here than rushed.
Confirmed distinct root causes (not yet fixed)
-
Multi-line class headers with
with/implementsclauses spanning several lines get absorbed
as a phantom function's return-type prefix. Example:class EditableTextState extends State<EditableText> with AutomaticKeepAliveClientMixin<EditableText>, WidgetsBindingObserver, TickerProviderStateMixin<EditableText>, TextSelectionDelegate, TextInputClient implements AutofillClient { // <- matched as a function named "AutofillClient"
Do not fix this by adding
implements/with/extendsto the return-type-prefix
keyword-exclusion lists — tried in the same investigation and confirmed to break a much more
common, legitimate pattern: generic method type-parameter bounds, e.g.
static Future<T?> pushNamed<T extends Object?>(...)influtter/navigator.dart:1902(and ~15
other methods in the same file), which also usesextends. A corpus-wide regression check
showed the naive fix cost more real matches than it gained. A real fix needs to distinguish
"extends inside a<...>generic-bound context" from "extends/implements/with as a bare
class-header continuation token", which the current regex has no mechanism for. -
Ternary-expression
:conflated with a constructor initializer-list:. Example
(flutter/object.dart:2814):(targetFrameMatch != null && targetFrameMatch.groupCount > 0) ? targetFrameMatch.group(1) : ...
targetFrameMatch.group(1)matches as a call (correctly reaches its own real closing paren via
the dart func_start: switch-expression arms and calls-with-lambda-args false-positive-matched as function definitions #2071 balanced-paren fix), but the following ternary:satisfies the same lookahead
alternative meant for constructor initializer lists (Foo(int x) : y = x {), producing a false
positive. Also seen:_RestorationInformation.named(...)(flutter/navigator.dart, several
call sites) andnodeToEnsureGeometry.toList()..sort(...)(flutter/object.dart:1586, a
cascade-operator chain) — need individual root-causing, may or may not share this exact
mechanism. -
EditableText's own constructor regex-matches but doesn't reach the final pipeline output.
Confirmed via direct regex probe:func_start.finditer()DOES matchEditableText({at
flutter/editable_text.dart:829(this was itself a dart func_start: switch-expression arms and calls-with-lambda-args false-positive-matched as function definitions #2071 bonus fix — previously didn't match at
all). Buttri_comparison_gatherer.gather_language("dart")'s post-pipelinegg_funcslist still
doesn't contain it. This points to adetector.py-level extraction/naming bug downstream of the
regex, not a regex problem — needs tracing through the actual pipeline (see
how_to_investigate_a_discrepancy.md's step 2b guidance), not just the raw regex. -
Static getters with a dotted (prefixed-import) return type never match at all. Example
(flutter/editable_text.dart:2076):static ui.BoxHeightStyle get defaultSelectionHeightStyle {
Root cause: the return-type-prefix character class (
[\w<>\[\],?], used ~4 times in this
regex) doesn't include., so a qualified type name likeui.BoxHeightStylecan't be consumed
as a single return-type token (there's no whitespace betweenui,., andBoxHeightStylefor
the token-separator[ \t\n]+to anchor on). The regex's own NAME-capture group already handles
dotted names ((?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*) — extending the same allowance to the
return-type charclass is the likely fix, but needs its own regression check (added.could
have knock-on effects at branch boundaries) before shipping, same discipline as the "extends"
near-miss above. -
Private named constructors with an empty/underscore-only name (
ClassName._(...)) and
bodyless default constructors (ClassName();) regex-match but reach different fates.
_DiscreteKeyFrameSimulation._(this._keyFrames, this.maxDuration)at
flutter/editable_text.dart:535regex-matches (confirmed via probe) but is missing from the
final pipeline output — likely the same class of bug as item 3._EditableTextTapOutsideAction();
(bodyless,flutter/editable_text.dart:6706) doesn't match the raw regex at all — a distinct
recall gap, possibly related to the existing bodyless-constructor handling that other languages
already solved (rust rust func_start misses bodyless multi-line trait method signatures (deserialize_* family) #1319, objc objective-c: bodyless C-style prototypes are only found by accident, with a wrong body span #1336) but dart may not fully mirror. -
Several remaining
missing_from_ggnames not yet individually traced:recorder
(flutter/object.dart),ChildSemanticsConfigurationsResultBuilder,OrdinalSortKey,
SemanticsData,SemanticsProperties(flutter/semantics.dart),extension
(flutter/theme_data.dart) — flagged for the next investigation pass, not yet root-caused.
Scope note
None of these are individually as high-leverage as #2071's fixes (each affects a handful of
occurrences, not ~126), and item 1 in particular needs a fundamentally different mechanism than a
keyword-exclusion list to fix safely. Good candidates for a future harden-language-extraction
pass on dart, or a follow-on tri-comparison-ledger-sweep dispatch once the ledger's dart shapes
reproduce again after #2071 lands.
🤖 Filed with Claude Code
Activity
squid-protocol commentedon Aug 27, 2026
Re-verified against current
main(2026-08-26) as part of a tri-comparison-ledger-sweep scoped to dart: PR #2129's fix only covered items 3 and 4 (dotted return-type charclass, colon-initializer 200-char length cap). Items 1, 2, 5, and 6 were never actually fixed, so this issue was closed asCOMPLETEDprematurely. Re-filed the still-open scope, re-confirmed with fresh regex tests and a freshgather_language("dart")diff, as #2308. The separateargs-counting defect this issue's item shape overlaps with (constructor param counts reading 0 under a generic-bounded class header) never had its own issue at all — filed as #2309.fix(dart): implements/with class-header leak, colon-initializer angle…
fix(powershell): shield here-strings; close final 3 tri-comparison le…
test(recall-audit): stop counting tree-sitter's own mistakes as GitGa…
test(recall-audit): stop counting tree-sitter's mistakes as GitGalaxy…