[L] Change in dart/sdk[main]: [cfe][PrimaryConstructors] Add isRedirecting/SuperInitializer flags t...

0 views
Skip to first unread message

Alexander Markov (Gerrit)

unread,
Mar 6, 2026, 9:58:05 AM (4 days ago) Mar 6
to Johnni Winther, Alexander Markov, Chloe Stefantsova, Erik Ernst, Commit Queue, Jens Johansen, dart-fe-te...@google.com, dart-vm-compil...@google.com, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Chloe Stefantsova, Erik Ernst and Johnni Winther

Alexander Markov voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Chloe Stefantsova
  • Erik Ernst
  • Johnni Winther
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: If0fabbda10b72304999a5380fce74f9e8fa91ca4
Gerrit-Change-Number: 486180
Gerrit-PatchSet: 7
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Erik Ernst <eer...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Attention: Erik Ernst <eer...@google.com>
Gerrit-Attention: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Fri, 06 Mar 2026 14:58:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Erik Ernst (Gerrit)

unread,
Mar 6, 2026, 10:06:40 AM (4 days ago) Mar 6
to Johnni Winther, Alexander Markov, Chloe Stefantsova, Commit Queue, Jens Johansen, dart-fe-te...@google.com, dart-vm-compil...@google.com, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Chloe Stefantsova and Johnni Winther

Erik Ernst voted and added 3 comments

Votes added by Erik Ernst

Code-Review+1

3 comments

Patchset-level comments
File tests/language/primary_constructors/header/constructor_name_error_test.dart
Line 65, Patchset 7 (Latest): // [cfe] Couldn't find constructor 'C3'.
Erik Ernst . unresolved

It might be nice if it could say "more than one constructor named 'C3' is declared", because it's confusing that it couldn't find any such constructor when you're looking at one of them.

Line 73, Patchset 7 (Latest): C4.other(int x) : this.named(x);
Erik Ernst . unresolved

Same consideration.

Open in Gerrit

Related details

Attention is currently required from:
  • Chloe Stefantsova
  • Johnni Winther
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: If0fabbda10b72304999a5380fce74f9e8fa91ca4
Gerrit-Change-Number: 486180
Gerrit-PatchSet: 7
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Erik Ernst <eer...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Attention: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Fri, 06 Mar 2026 15:06:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Johnni Winther (Gerrit)

unread,
Mar 9, 2026, 5:06:33 AM (22 hours ago) Mar 9
to Erik Ernst, Alexander Markov, Chloe Stefantsova, Commit Queue, Jens Johansen, dart-fe-te...@google.com, dart-vm-compil...@google.com, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Chloe Stefantsova

Johnni Winther added 2 comments

File tests/language/primary_constructors/header/constructor_name_error_test.dart
Line 65, Patchset 7: // [cfe] Couldn't find constructor 'C3'.
Erik Ernst . resolved

It might be nice if it could say "more than one constructor named 'C3' is declared", because it's confusing that it couldn't find any such constructor when you're looking at one of them.

Johnni Winther

This is addressed in a follow-up.

Line 73, Patchset 7: C4.other(int x) : this.named(x);
Erik Ernst . resolved

Same consideration.

Johnni Winther

Same.

Open in Gerrit

Related details

Attention is currently required from:
  • Chloe Stefantsova
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: If0fabbda10b72304999a5380fce74f9e8fa91ca4
Gerrit-Change-Number: 486180
Gerrit-PatchSet: 8
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Erik Ernst <eer...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Attention: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 09:06:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Erik Ernst <eer...@google.com>
satisfied_requirement
open
diffy

Chloe Stefantsova (Gerrit)

unread,
Mar 9, 2026, 5:31:16 AM (22 hours ago) Mar 9
to Johnni Winther, Chloe Stefantsova, Erik Ernst, Alexander Markov, Commit Queue, Jens Johansen, dart-fe-te...@google.com, dart-vm-compil...@google.com, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Johnni Winther

Chloe Stefantsova voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: If0fabbda10b72304999a5380fce74f9e8fa91ca4
Gerrit-Change-Number: 486180
Gerrit-PatchSet: 8
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Erik Ernst <eer...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 09:31:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Johnni Winther (Gerrit)

unread,
Mar 9, 2026, 5:42:56 AM (21 hours ago) Mar 9
to Chloe Stefantsova, Erik Ernst, Alexander Markov, Commit Queue, Jens Johansen, dart-fe-te...@google.com, dart-vm-compil...@google.com, rev...@dartlang.org, vm-...@dartlang.org

Johnni Winther voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: If0fabbda10b72304999a5380fce74f9e8fa91ca4
Gerrit-Change-Number: 486180
Gerrit-PatchSet: 8
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Erik Ernst <eer...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 09:42:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
Mar 9, 2026, 6:37:04 AM (20 hours ago) Mar 9
to Johnni Winther, Chloe Stefantsova, Erik Ernst, Alexander Markov, Jens Johansen, dart-fe-te...@google.com, dart-vm-compil...@google.com, rev...@dartlang.org, vm-...@dartlang.org

Commit Queue submitted the change

Change information

Commit message:
[cfe][PrimaryConstructors] Add isRedirecting/SuperInitializer flags to InvalidInitializer

This adds isRedirectingInitializer and isSuperInitializer to the Initializer hierarchy and adds flags to InvalidInitializer to signal when the InvalidInitializer should be taking as a redirecting or super initializer. This allows us to avoid miscatergorizing such declarations when they are erroneous.

Part of #61700

TEST=existing
Change-Id: If0fabbda10b72304999a5380fce74f9e8fa91ca4
Commit-Queue: Johnni Winther <johnni...@google.com>
Reviewed-by: Erik Ernst <eer...@google.com>
Reviewed-by: Alexander Markov <alexm...@google.com>
Reviewed-by: Chloe Stefantsova <cstefa...@google.com>
Files:
  • M pkg/front_end/lib/src/fragment/constructor/declaration.dart
  • M pkg/front_end/lib/src/fragment/constructor/encoding.dart
  • M pkg/front_end/lib/src/kernel/body_builder.dart
  • M pkg/front_end/lib/src/kernel/expression_generator.dart
  • M pkg/front_end/lib/src/kernel/internal_ast.dart
  • M pkg/front_end/lib/src/kernel/kernel_target.dart
  • M pkg/front_end/lib/src/kernel/resolver_helpers.dart
  • M pkg/front_end/lib/src/type_inference/external_ast_helper.dart
  • M pkg/front_end/lib/src/type_inference/inference_visitor.dart
  • M pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.expect
  • M pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.modular.expect
  • M pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.transformed.expect
  • M pkg/front_end/testcases/extension_types/erroneous_constructors.dart.strong.expect
  • M pkg/front_end/testcases/extension_types/erroneous_constructors.dart.strong.modular.expect
  • M pkg/front_end/testcases/extension_types/erroneous_constructors.dart.strong.transformed.expect
  • M pkg/front_end/testcases/extension_types/issue52119.dart.strong.expect
  • M pkg/front_end/testcases/extension_types/issue52119.dart.strong.modular.expect
  • M pkg/front_end/testcases/extension_types/issue52119.dart.strong.transformed.expect
  • M pkg/front_end/testcases/extension_types/issue52119_2.dart.strong.expect
  • M pkg/front_end/testcases/extension_types/issue52119_2.dart.strong.modular.expect
  • M pkg/front_end/testcases/extension_types/issue52119_2.dart.strong.transformed.expect
  • A pkg/front_end/testcases/primary_constructors/redirecting_error.dart
  • A pkg/front_end/testcases/primary_constructors/redirecting_error.dart.strong.expect
  • A pkg/front_end/testcases/primary_constructors/redirecting_error.dart.strong.modular.expect
  • A pkg/front_end/testcases/primary_constructors/redirecting_error.dart.strong.outline.expect
  • A pkg/front_end/testcases/primary_constructors/redirecting_error.dart.strong.transformed.expect
  • A pkg/front_end/testcases/primary_constructors/redirecting_error.dart.textual_outline.expect
  • M pkg/front_end/testcases/textual_outline.status
  • M pkg/kernel/binary.md
  • M pkg/kernel/lib/binary/ast_from_binary.dart
  • M pkg/kernel/lib/binary/ast_to_binary.dart
  • M pkg/kernel/lib/binary/tag.dart
  • M pkg/kernel/lib/clone.dart
  • M pkg/kernel/lib/src/ast/initializers.dart
  • M pkg/kernel/lib/src/equivalence.dart
  • M runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
  • M runtime/vm/compiler/frontend/kernel_fingerprints.cc
  • M runtime/vm/compiler/frontend/kernel_translation_helper.cc
  • M runtime/vm/compiler/frontend/scope_builder.cc
  • M runtime/vm/kernel_binary.h
  • M tests/language/enum/enhanced_enums_error_test.dart
  • M tests/language/primary_constructors/header/constructor_name_error_test.dart
Change size: L
Delta: 42 files changed, 240 insertions(+), 129 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Chloe Stefantsova, +1 by Erik Ernst, +1 by Alexander Markov
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: If0fabbda10b72304999a5380fce74f9e8fa91ca4
Gerrit-Change-Number: 486180
Gerrit-PatchSet: 9
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Erik Ernst <eer...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages