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

Fasta: Implement adjusted member conflict rules #33237

Closed
eernstg opened this issue May 25, 2018 · 10 comments
Closed

Fasta: Implement adjusted member conflict rules #33237

eernstg opened this issue May 25, 2018 · 10 comments
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. P2 A bug or feature request we're likely to work on
Milestone

Comments

@eernstg
Copy link
Member

eernstg commented May 25, 2018

This is the Fasta specific issue for #33235, which has the details.

@eernstg eernstg added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label May 25, 2018
@kmillikin kmillikin added this to the Dart2Stable milestone May 28, 2018
@kmillikin kmillikin added this to Triaged in Dart Front End May 28, 2018
@kmillikin
Copy link

This is basically a duplicate of #32613 and #32014; related to #31596, #32917, and #30674.

@eernstg
Copy link
Member Author

eernstg commented May 28, 2018

@kmillikin, those issues were created long before dartLangSpec.tex was updated as described in #33235, so they can hardly require the same changes; this means that I'd need to look into all those issues to make sure that they request the right thing. Thanks for the info!

@eernstg
Copy link
Member Author

eernstg commented May 28, 2018

PS: Please postpone the implementation requested in this issue for a few days—one more update to the language specification is currently under review (marked in #33235 as 'Update under review', handled here). We will add yet another comment here when that update has been resolved.

(Edit: done, see below)

@eernstg
Copy link
Member Author

eernstg commented May 28, 2018

@kmillikin, regarding issues #30674, #31596, #32014, and #32917: I took a look at them and concluded that they are about overriding (which is concerned with two declarations of a member of the same kind). This means that there is no overlap with this issue (which is concerned with situations involving two different kinds of members, e.g., a getter and a setter, or a static member and an instance member).

In #32613 I added a reference to a table in #33235, which may be helpful because it lists all cases.

@eernstg
Copy link
Member Author

eernstg commented May 31, 2018

As of 08c893d, the updated and simplified rules in the specification have been landed, so the work here may proceed.

@JekCharlsonYu JekCharlsonYu added the P2 A bug or feature request we're likely to work on label Jun 15, 2018
@kmillikin
Copy link

We are currently missing the ones involving static members and a few of the other ones:

  • declares constructor C.n and declares static setter n=
  • declares static getter n and has instance getter n
  • declares static getter n and has instance method n
  • declares static getter n and has instance setter n=
  • declares static method n and has instance getter n
  • declares static method n and has instance method n
  • declares static method n and has instance setter n=
  • declares static setter n= and declares static method n
  • declares static setter n= and has instance getter n
  • declares static setter n= and has instance method n
  • declares static setter n= and has instance setter n=
  • has instance setter n= and has instance method n (we catch this one if one or both methods are inherited, but not if they're both declared in the class)

@kmillikin
Copy link

@askeksa-google can you take "constructor/static setter" and "static setter/static method"?

I'll implement the others as part of override checking during top-level type inference.

@askeksa-google askeksa-google moved this from Triaged to In Progress in Dart Front End Jun 18, 2018
dart-bot pushed a commit that referenced this issue Jun 28, 2018
…ic method.

Bug: #33237
Change-Id: I44c69f32039de9b024c942706e96bf1998217350
Reviewed-on: https://dart-review.googlesource.com/60583
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
dart-bot pushed a commit that referenced this issue Jul 16, 2018
See #32613
and #33235 (comment)

Bug: #32613, #33235, #33237
Change-Id: I0d1432185b6811137e31135ac2c7f58c4de2de6c
Reviewed-on: https://dart-review.googlesource.com/64500
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
@kmillikin kmillikin moved this from In Progress to Done in Dart Front End Aug 1, 2018
@johnniwinther
Copy link
Member

co19_2/Language/Classes/Constructors/name_t01 and others are still missing a compile-time error.

@johnniwinther johnniwinther reopened this Oct 29, 2018
@askeksa-google
Copy link

co19_2/Language/Classes/Constructors/name_t01 is incorrect, as the code in it is valid Dart. A named constructor does not conflict with an instance variable. This and similarly incorrect tests are marked in co19_2-kernel.status as Legal, see #33235.

@askeksa-google
Copy link

I have filed dart-lang/co19#179 for these incorrect tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. P2 A bug or feature request we're likely to work on
Projects
Development

No branches or pull requests

5 participants