[L] Change in dart/sdk[main]: Infer field / super formal parameter element type only if the first f...

0 views
Skip to first unread message

Johnni Winther (Gerrit)

unread,
Jun 23, 2026, 6:20:57 AM (yesterday) Jun 23
to Fedor Shcheglov, Konstantin Shcheglov, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Fedor Shcheglov

Johnni Winther voted and added 1 comment

Votes added by Johnni Winther

Code-Review+1

1 comment

File pkg/analyzer/test/src/summary/elements/class_test.dart
Line 13957, Patchset 8 (Latest):class A {
final int? n1;
A({n1});
augment A({this.n1});
}
''');
Johnni Winther . unresolved

Add a test where the type of the type is declared on the first fragment, like

    class A {
final int? n1;
A({num? n1});
augment A({this.n1});
}

to verify that the parameter comes from the first fragment (`num?` in this case) and not just the omission of inference (which might yield `dynamic`).
Open in Gerrit

Related details

Attention is currently required from:
  • Fedor Shcheglov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Idebb6155b1df5cb8329e33a02e5ce8522c4fe406
Gerrit-Change-Number: 515440
Gerrit-PatchSet: 8
Gerrit-Owner: Fedor Shcheglov <fedor.s...@gmail.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Attention: Fedor Shcheglov <fedor.s...@gmail.com>
Gerrit-Comment-Date: Tue, 23 Jun 2026 10:20:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Konstantin Shcheglov (Gerrit)

unread,
Jun 23, 2026, 4:39:47 PM (16 hours ago) Jun 23
to Fedor Shcheglov, Johnni Winther, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Fedor Shcheglov and Johnni Winther

Konstantin Shcheglov voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Fedor Shcheglov
  • Johnni Winther
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: Idebb6155b1df5cb8329e33a02e5ce8522c4fe406
    Gerrit-Change-Number: 515440
    Gerrit-PatchSet: 11
    Gerrit-Owner: Fedor Shcheglov <fedor.s...@gmail.com>
    Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
    Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
    Gerrit-Attention: Fedor Shcheglov <fedor.s...@gmail.com>
    Gerrit-Attention: Johnni Winther <johnni...@google.com>
    Gerrit-Comment-Date: Tue, 23 Jun 2026 20:39:43 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Fedor Shcheglov (Gerrit)

    unread,
    Jun 23, 2026, 4:40:43 PM (15 hours ago) Jun 23
    to Konstantin Shcheglov, Johnni Winther, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
    Attention needed from Johnni Winther

    Fedor Shcheglov added 1 comment

    File pkg/analyzer/test/src/summary/elements/class_test.dart

    final int? n1;
    A({n1});
    augment A({this.n1});
    }
    ''');
    Johnni Winther . resolved

    Add a test where the type of the type is declared on the first fragment, like

        class A {
    final int? n1;
    A({num? n1});
    augment A({this.n1});
    }

    to verify that the parameter comes from the first fragment (`num?` in this case) and not just the omission of inference (which might yield `dynamic`).
    Fedor Shcheglov

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Johnni Winther
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: Idebb6155b1df5cb8329e33a02e5ce8522c4fe406
    Gerrit-Change-Number: 515440
    Gerrit-PatchSet: 9
    Gerrit-Owner: Fedor Shcheglov <fedor.s...@gmail.com>
    Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
    Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
    Gerrit-Attention: Johnni Winther <johnni...@google.com>
    Gerrit-Comment-Date: Tue, 23 Jun 2026 20:40:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Johnni Winther <johnni...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Paul Berry (Gerrit)

    unread,
    Jun 23, 2026, 6:37:20 PM (14 hours ago) Jun 23
    to Fedor Shcheglov, Konstantin Shcheglov, Johnni Winther, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
    Attention needed from Fedor Shcheglov and Johnni Winther

    Paul Berry voted and added 1 comment

    Votes added by Paul Berry

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 11 (Latest):
    Paul Berry . resolved

    Changes from patchset 8-11 lgtm.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Fedor Shcheglov
    • Johnni Winther
    Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: Idebb6155b1df5cb8329e33a02e5ce8522c4fe406
      Gerrit-Change-Number: 515440
      Gerrit-PatchSet: 11
      Gerrit-Owner: Fedor Shcheglov <fedor.s...@gmail.com>
      Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
      Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
      Gerrit-Reviewer: Paul Berry <paul...@google.com>
      Gerrit-Attention: Johnni Winther <johnni...@google.com>
      Gerrit-Comment-Date: Tue, 23 Jun 2026 22:37:15 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Konstantin Shcheglov (Gerrit)

      unread,
      Jun 23, 2026, 7:14:13 PM (13 hours ago) Jun 23
      to Fedor Shcheglov, Paul Berry, Johnni Winther, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
      Attention needed from Fedor Shcheglov and Johnni Winther

      Konstantin Shcheglov voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Fedor Shcheglov
      • Johnni Winther
      Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: Idebb6155b1df5cb8329e33a02e5ce8522c4fe406
      Gerrit-Change-Number: 515440
      Gerrit-PatchSet: 11
      Gerrit-Owner: Fedor Shcheglov <fedor.s...@gmail.com>
      Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
      Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
      Gerrit-Reviewer: Paul Berry <paul...@google.com>
      Gerrit-Attention: Fedor Shcheglov <fedor.s...@gmail.com>
      Gerrit-Attention: Johnni Winther <johnni...@google.com>
      Gerrit-Comment-Date: Tue, 23 Jun 2026 23:14:07 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

      unread,
      Jun 23, 2026, 7:14:36 PM (13 hours ago) Jun 23
      to Fedor Shcheglov, Paul Berry, Konstantin Shcheglov, Johnni Winther, dart-analys...@google.com, rev...@dartlang.org

      dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change

      Change information

      Commit message:
      Infer field / super formal parameter element type only if the first fragment is a field / super.
      Change-Id: Idebb6155b1df5cb8329e33a02e5ce8522c4fe406
      Reviewed-by: Konstantin Shcheglov <sche...@google.com>
      Commit-Queue: Konstantin Shcheglov <sche...@google.com>
      Reviewed-by: Paul Berry <paul...@google.com>
      Files:
      • M pkg/analyzer/lib/src/summary2/instance_member_inferrer.dart
      • M pkg/analyzer/test/src/diagnostics/augmentation_formal_parameter_test.dart
      • M pkg/analyzer/test/src/summary/elements/class_test.dart
      Change size: L
      Delta: 3 files changed, 641 insertions(+), 12 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Konstantin Shcheglov, +1 by Paul Berry
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: Idebb6155b1df5cb8329e33a02e5ce8522c4fe406
      Gerrit-Change-Number: 515440
      Gerrit-PatchSet: 12
      Gerrit-Owner: Fedor Shcheglov <fedor.s...@gmail.com>
      Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
      Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
      Gerrit-Reviewer: Paul Berry <paul...@google.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages