Skip to content

Missing compile-time errors on transitivity issues in class modifiers involving legacy libraries and 'implements' superinterfaces #52321

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

Closed
chloestefantsova opened this issue May 9, 2023 · 3 comments
Assignees
Labels
legacy-area-analyzer Use area-devexp instead. legacy-area-front-end Legacy: Use area-dart-model instead. P2 A bug or feature request we're likely to work on

Comments

@chloestefantsova
Copy link
Contributor

As pointed out in this comment: #52078 (comment), reporting of some compile-time errors related to transitive issues in class modifiers doesn't yet work in either the Analyzer or the CFE.

Another comment suggests that the failing tests warrant a new GitHub issue to track them: #52078 (comment)

The failing tests in question are the following:

versioning_A03_t01.dart - checks that final class cannot be extended // fails for both the Analyzer and the CFE
versioning_A03_t02.dart - checks that final class cannot be implemented // passes for the Analyzer, but fails for the CFE
versioning_A03_t04.dart - checks that mixin on a final class cannot be declared // fails for both the Analyzer and the CFE

@chloestefantsova chloestefantsova added legacy-area-analyzer Use area-devexp instead. legacy-area-front-end Legacy: Use area-dart-model instead. labels May 9, 2023
@chloestefantsova
Copy link
Contributor Author

/cc @eernstg @kallentu @johnniwinther

@eernstg
Copy link
Member

eernstg commented May 9, 2023

Perhaps it's worth mentioning that versioning_A03_t01.dart contains cases where a compile-time error should be reported because the class in the test library isn't base/final/sealed, but this error is not reported.

Similarly, versioning_A03_t04.dart contains mixins that should have an error because they aren't base, but this error is not reported.

The third one versioning_A03_t02.dart is different. This test expects errors because a Dart 3.0 class (whose modifiers do not matter, this is always an error) has an implements edge to a direct superinterface, and there is an indirect superinterface in a different library which is base or final.

The test failures probably occur because of the legacy (2.19) class which is present in all superinterface graphs in these tests, and it is only possible to have these situations because the final class is in a platform library.

@pq pq added the P2 A bug or feature request we're likely to work on label May 9, 2023
@kallentu
Copy link
Member

I have some split issues that cover this entire issue. We can use those to track since it splits up analyzer and cfe work. I'll close this one.
#52115
#52316
#52315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-analyzer Use area-devexp instead. legacy-area-front-end Legacy: Use area-dart-model instead. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

4 participants