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

Language tests: Eliminate warning for instance/static method clash #31353

Closed
eernstg opened this Issue Nov 10, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@eernstg
Member

eernstg commented Nov 10, 2017

This is the test specific issue for #31201, which has the details.

The goal of this issue is to change all relevant tests in tests/... of the SDK repo such that they are based on the expectation that it is no longer a static warning (nor an error) when a class B declares a static member n and a subclass C of B declares an instance method, getter, or setter also named n.

@eernstg eernstg added the area-test label Nov 10, 2017

@eernstg eernstg self-assigned this Nov 16, 2017

@eernstg

This comment has been minimized.

Show comment
Hide comment
@eernstg

eernstg Aug 27, 2018

Member

It is not trivial to find the affected tests, but here are some results:

Status files contain the following entries for override_field_test/02 which is definitely testing the topic of this issue:

language_2_analyzer.status:override_field_test/02: CompileTimeError
language_2_dartdevc.status:override_field_test/02: CompileTimeError

Hence, the analyzer and dartdevc seem to emit the error that they shouldn't, but the test has been updated to have the correct expectation, and the tools are blamed for emitting a compile-time error that they shouldn't: All is well!

The following tests are related, but they are concerned with the converse case (a static member in a subclass has a name clash with an inherited instance member, which is still an error):

field_override3_test.dart
getter_override_test.dart
method_override7_test.dart

In other words, I can only spot one single test which is testing the topic of this issue, and it is marked correctly, and the tools that do not behave as specified are marked as they should in status files.

With that, I'll conclude that the tests are OK, and close this issue.

Member

eernstg commented Aug 27, 2018

It is not trivial to find the affected tests, but here are some results:

Status files contain the following entries for override_field_test/02 which is definitely testing the topic of this issue:

language_2_analyzer.status:override_field_test/02: CompileTimeError
language_2_dartdevc.status:override_field_test/02: CompileTimeError

Hence, the analyzer and dartdevc seem to emit the error that they shouldn't, but the test has been updated to have the correct expectation, and the tools are blamed for emitting a compile-time error that they shouldn't: All is well!

The following tests are related, but they are concerned with the converse case (a static member in a subclass has a name clash with an inherited instance member, which is still an error):

field_override3_test.dart
getter_override_test.dart
method_override7_test.dart

In other words, I can only spot one single test which is testing the topic of this issue, and it is marked correctly, and the tools that do not behave as specified are marked as they should in status files.

With that, I'll conclude that the tests are OK, and close this issue.

@eernstg eernstg closed this Aug 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment