Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we cover extension type member conflicts and name clashes? #2265

Closed
eernstg opened this issue Sep 8, 2023 · 0 comments
Closed

Do we cover extension type member conflicts and name clashes? #2265

eernstg opened this issue Sep 8, 2023 · 0 comments
Assignees

Comments

@eernstg
Copy link
Member

eernstg commented Sep 8, 2023

Just noticed a case that we may not cover — but I did not search very thoroughly, so this issue might be a no-op because we have it already:

We should cover name clashes and name near-clashes with the representation variable of an extension type, because the representation variable is given special treatment in so many ways. Stuff along these lines:

extension type ET1(int id1) {
  void id() {} // No problems with this one, is just redeclared a few times.
  external int id2;
}

extension type ET2a(int id) {
  void id() {} // Name clash with representation variable.
}

extension type ET2b(int id) {
  set id(_) {} // OK, name is `id=`.
}

extension type ET2c(int id) implements ET1 {
  static int id = 1; // Name clash with representation variable.
}

extension type ET2d(int id) implements ET1 {
  static String get id1 => ''; // Class member conflict with `ET1` representation variable.
  void id2() {} // OK, redeclares.
}
@sgrekhov sgrekhov self-assigned this Sep 8, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Sep 18, 2023
2023-09-15 sgrekhov22@gmail.com dart-lang/co19#1400. Update error expectations for CFE (dart-lang/co19#2282)
2023-09-15 sgrekhov22@gmail.com Fixes dart-lang/co19#2147. Add access to this tests (dart-lang/co19#2280)
2023-09-15 sgrekhov22@gmail.com dart-lang/co19#2258. Add missing experimental flag (dart-lang/co19#2281)
2023-09-14 sgrekhov22@gmail.com dart-lang/co19#2258. Only private field of an extension type is promotable (dart-lang/co19#2279)
2023-09-14 sgrekhov22@gmail.com Fixes dart-lang/co19#2261. Remove obsolete inference-update-2 experimental flag (dart-lang/co19#2278)
2023-09-14 sgrekhov22@gmail.com dart-lang/co19#2258. No error ib case of the `noSuchMethod` forwarder of a method (dart-lang/co19#2277)
2023-09-13 sgrekhov22@gmail.com dart-lang/co19#2258. Add more private fields promotion tests (dart-lang/co19#2276)
2023-09-13 sgrekhov22@gmail.com Fixes dart-lang/co19#2265. Extension types. Add more member conflict tests (dart-lang/co19#2270)
2023-09-12 sgrekhov22@gmail.com dart-lang/co19#1400. Add type aliases test (dart-lang/co19#2274)
2023-09-12 sgrekhov22@gmail.com Fixes dart-lang/co19#2271. Fix typo in promotion_A01_t01.dart (dart-lang/co19#2272)

Change-Id: Icc18b7b8e8c7aea103fc255e0da01a5f15601dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326303
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants