[M] Change in dart/sdk[main]: DeCo. Use more general FormalParameterImpl.fullTypeAnnotation

0 views
Skip to first unread message

Paul Berry (Gerrit)

unread,
Dec 9, 2025, 6:42:09 PM12/9/25
to Konstantin Shcheglov, Johnni Winther, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther and Konstantin Shcheglov

Paul Berry added 1 comment

File pkg/analyzer/lib/src/generated/error_verifier.dart
Line 3364, Patchset 2 (Latest): }
Paul Berry . unresolved

What happens if `fullTypeAnnotation` is `null`? It seems like in that case we wouldn't report any diagnostic, which seems like an unintentional change in behavior.

Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
  • Konstantin Shcheglov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not 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: I6a6b7473b55b992662822c2fbaee578afe856f6c
Gerrit-Change-Number: 467260
Gerrit-PatchSet: 2
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Konstantin Shcheglov <sche...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Tue, 09 Dec 2025 23:42:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Konstantin Shcheglov (Gerrit)

unread,
Dec 9, 2025, 7:24:31 PM12/9/25
to Paul Berry, Johnni Winther, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther and Paul Berry

Konstantin Shcheglov added 1 comment

File pkg/analyzer/lib/src/generated/error_verifier.dart
Paul Berry . unresolved

What happens if `fullTypeAnnotation` is `null`? It seems like in that case we wouldn't report any diagnostic, which seems like an unintentional change in behavior.

Konstantin Shcheglov

In extension types you can get `Never` only if you write it explicitly, as simple or default formal parameter. In these cases `fullTypeAnnotation` cannot be `null`. Maybe it would be easier if I wrote this explicitly in the code instead of adding a new getter. At least until we get two more use cases :-P

Let me try to do this...

Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
  • Paul Berry
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not 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: I6a6b7473b55b992662822c2fbaee578afe856f6c
Gerrit-Change-Number: 467260
Gerrit-PatchSet: 2
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Paul Berry <paul...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Wed, 10 Dec 2025 00:24:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Paul Berry <paul...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Konstantin Shcheglov (Gerrit)

unread,
Dec 10, 2025, 1:16:48 AM12/10/25
to Paul Berry, Johnni Winther, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther and Paul Berry

Konstantin Shcheglov voted and added 2 comments

Votes added by Konstantin Shcheglov

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Konstantin Shcheglov . resolved

PTAL

File pkg/analyzer/lib/src/generated/error_verifier.dart
Line 3364, Patchset 2: }
Paul Berry . resolved

What happens if `fullTypeAnnotation` is `null`? It seems like in that case we wouldn't report any diagnostic, which seems like an unintentional change in behavior.

Konstantin Shcheglov

In extension types you can get `Never` only if you write it explicitly, as simple or default formal parameter. In these cases `fullTypeAnnotation` cannot be `null`. Maybe it would be easier if I wrote this explicitly in the code instead of adding a new getter. At least until we get two more use cases :-P

Let me try to do this...

Konstantin Shcheglov

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
  • Paul Berry
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not 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: I6a6b7473b55b992662822c2fbaee578afe856f6c
Gerrit-Change-Number: 467260
Gerrit-PatchSet: 3
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Paul Berry <paul...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Wed, 10 Dec 2025 06:16:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Paul Berry <paul...@google.com>
Comment-In-Reply-To: Konstantin Shcheglov <sche...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Paul Berry (Gerrit)

unread,
Dec 10, 2025, 11:55:19 AM12/10/25
to Konstantin Shcheglov, Johnni Winther, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther and Konstantin Shcheglov

Paul Berry voted and added 2 comments

Votes added by Paul Berry

Code-Review+1

2 comments

Patchset-level comments
Paul Berry . resolved

It looks like the commit message needs to be rewritten; it still refers to `fullTypeAnnotation`.

Lgtm assuming the commit message is rewritten.

File pkg/analyzer/lib/src/generated/error_verifier.dart
Paul Berry . resolved

What happens if `fullTypeAnnotation` is `null`? It seems like in that case we wouldn't report any diagnostic, which seems like an unintentional change in behavior.

Konstantin Shcheglov

In extension types you can get `Never` only if you write it explicitly, as simple or default formal parameter. In these cases `fullTypeAnnotation` cannot be `null`. Maybe it would be easier if I wrote this explicitly in the code instead of adding a new getter. At least until we get two more use cases :-P

Let me try to do this...

Konstantin Shcheglov

Done

Paul Berry

This makes much more sense, thanks.

Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
  • Konstantin 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: I6a6b7473b55b992662822c2fbaee578afe856f6c
Gerrit-Change-Number: 467260
Gerrit-PatchSet: 3
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Konstantin Shcheglov <sche...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Wed, 10 Dec 2025 16:55:16 +0000
satisfied_requirement
open
diffy

Konstantin Shcheglov (Gerrit)

unread,
Dec 10, 2025, 11:57:09 AM12/10/25
to Paul Berry, Johnni Winther, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther

Konstantin Shcheglov voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • 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: I6a6b7473b55b992662822c2fbaee578afe856f6c
Gerrit-Change-Number: 467260
Gerrit-PatchSet: 4
Gerrit-Owner: Konstantin Shcheglov <sche...@google.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: Wed, 10 Dec 2025 16:57:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
Dec 10, 2025, 11:57:26 AM12/10/25
to Konstantin Shcheglov, Paul Berry, Johnni Winther, dart-analys...@google.com, rev...@dartlang.org

Commit Queue submitted the change

Unreviewed changes

3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
DeCo. Use more general FormalParameterImpl.fullTypeAnnotation

Replace `ExtensionTypeDeclarationImpl.fieldType` with more general
`representationFormalParameter`.

Use `representationFormalParameter` when reporting
EXTENSION_TYPE_REPRESENTATION_TYPE_BOTTOM.

In the extension type linker, rely on `element.representation.type` for
dependency analysis and evaluation.
Change-Id: I6a6b7473b55b992662822c2fbaee578afe856f6c
Reviewed-by: Paul Berry <paul...@google.com>
Commit-Queue: Konstantin Shcheglov <sche...@google.com>
Files:
  • M pkg/analyzer/lib/src/dart/ast/ast.dart
  • M pkg/analyzer/lib/src/generated/error_verifier.dart
  • M pkg/analyzer/lib/src/summary2/extension_type.dart
Change size: S
Delta: 3 files changed, 17 insertions(+), 18 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +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: I6a6b7473b55b992662822c2fbaee578afe856f6c
Gerrit-Change-Number: 467260
Gerrit-PatchSet: 5
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages