[L] Change in dart/sdk[main]: [fe][rti] Add shared structural context schemas

0 views
Skip to first unread message

Chloe Stefantsova (Gerrit)

unread,
8:10 AM (10 hours ago) 8:10 AM
to Chloe Stefantsova, Paul Berry, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Paul Berry

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • 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: Ic67fc96f58c5980e9ba9606054d496f728a18c55
Gerrit-Change-Number: 508960
Gerrit-PatchSet: 1
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Paul Berry <paul...@google.com>
Gerrit-Comment-Date: Wed, 03 Jun 2026 12:10:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Paul Berry (Gerrit)

unread,
3:25 PM (3 hours ago) 3:25 PM
to Chloe Stefantsova, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Chloe Stefantsova

Paul Berry voted and added 3 comments

Votes added by Paul Berry

Code-Review+1

3 comments

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

Lgtm assuming comments are addressed

File pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer_operations.dart
Line 965, Patchset 1 (Latest): SharedType? lookupMemberTypeInternal(
Paul Berry . unresolved

Would you mind adding a documentation comment here? Specifically, to address the following questions:

  • What kinds of class members should be searched? (I suspect the answer is: instance getters and instance methods only; the lookup process should ignore static members, constructors, setters. Caller guarantees not to try to look up operators)
  • What type should be returned if the member that's found is a getter (the getter's return type or the getter's function type)? (I suspect the answer is: the getter's return type)
  • Should this look up members of the class or the interface? In other words, if `type` inherits a member from a superclass, interface, or mixin, should that be returned? (I suspect the answer is yes, with appropriate type substitution).
  • Will the caller ever supply a type that isn't an interface type? (E.g., a function type, a `?` type, `Null`, `Never`, or a type parameter)? What should the behavior be in each of these cases? (I suspect that lookup should find members of `Object` in all cases, and should additionally find an appropriately typed `call` method in the case of a function type. For a type parameter type, I suspect that lookup should use the type parameter's bound. I'm not sure what behavior we want for `Never`.)
  • What does a return value of `null` mean? (I suspect the answer is, member not found).
File pkg/_fe_analyzer_shared/lib/src/types/shared_type.dart
Line 252, Patchset 1 (Latest):sealed class SharedStructuralContextSchema implements SharedType {}
Paul Berry . unresolved

It seems to me that these classes are at the heart of the algorithm, so it would be really nice to have some doc comments explaining when each is used, ideally with some code examples.

Open in Gerrit

Related details

Attention is currently required from:
  • Chloe Stefantsova
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: Ic67fc96f58c5980e9ba9606054d496f728a18c55
Gerrit-Change-Number: 508960
Gerrit-PatchSet: 1
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Comment-Date: Wed, 03 Jun 2026 19:25:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages