Skip to content

dart: func_start recall gaps (supersedes closed #2072) — dotted return types, bodyless constructors, extension #2462

Closed

Description

@squid-protocol

Summary

Fresh, concrete list from the 2026-08-29 tri-comparison recall audit. #2072 tracked this class
but was closed before the residual was resolved; these 9 occurrences still reproduce (dart func
recall 99.5%).

language-crucible/data/dart/flutter/:

file:line name form
editable_text.dart _EditableTextTapOutsideAction bodyless default constructor _Foo();
editable_text.dart _EditableTextTapUpOutsideAction same
editable_text.dart _characterBoundary / _linebreak / _nextWordBoundary local function / closure form
framework.dart findAncestorStateOfType / findRootAncestorStateOfType generic method T? findAncestorStateOfType<T extends State<StatefulWidget>>()
semantics.dart ChildSemanticsConfigurationsResultBuilder bodyless constructor
theme_data.dart extension extension is a real Dart 2.7+ top-level keyword, not matched

Fix direction

Per #2072's own analysis: item 1 (bodyless constructors) mirrors the rust #1319 / objc #1336
bodyless handling dart doesn't fully replicate; extension needs a dedicated func_start
branch; the generic-method ones need the return-type-prefix charclass to admit <... extends ...>. Each needs its own regression check — a naive charclass widening breaks generic method
type-parameter bounds (confirmed in #2072).

Found by

tri-comparison-ledger-sweep step 2.6 recall audit, 2026-08-29. Supersedes #2072.

Activity

  1. added
    bug
    core-engine
    on Aug 29, 2026
  2. squid-protocol commented on Aug 29, 2026

    @squid-protocol
    OwnerAuthor

    PR #2467 fixes 8 of the 9 occurrences:

    • ✅ multi-line arrow methods (TextBoundary _characterBoundary() =>\n cond ? _A(x) : _B(y);, ×3) — the ternary on the continuation line was false-matching func_start, capping the terminator search at that phantom. The dart arrow-terminator scan now walks past such phantoms to the first genuine top-level ; and marks the span covered.
    • ✅ <T extends State<StatefulWidget>> generic methods (findAncestorStateOfType, findRootAncestorStateOfType) — one level of generic-argument nesting added to the three name-following lookaheads in dart func_start.
    • ✅ bodyless default/named constructors (_EditableTextTapOutsideAction();, _EditableTextTapUpOutsideAction();, ChildSemanticsConfigurationsResultBuilder();) — branch D now accepts empty parens; detector.py gates the shape on real brace-depth tracking (kept only when the name's leading segment is the nearest enclosing class/mixin/enum), so it can't fire on a bare zero-arg call statement.

    dart func recall 99.5% → 99.9%, no precision loss.

    Residual (still open)

    flutter/theme_data.dart:993 — T? extension<T>() => extensions[T] as T?;, a method literally named extension. extension is a semi-reserved built-in identifier and appears in every keyword-exclusion list in dart func_start (to reject real extension Foo on Bar { declarations). 1 occurrence in the corpus; deferred rather than risk destabilizing extension-declaration detection for it.

  3. added this to the v2.4.9 milestone on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-engine

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions