Skip to content

Conversation

@sgrekhov
Copy link
Contributor

@sgrekhov sgrekhov commented Nov 5, 2025

No description provided.

Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, couple of comments!

}

extension ExtE on E {
static int get foo => 42;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And ExtE2/3 that has a method or variable foo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify. In this test we have variable/getter/method declared in class/mixin/extension type and a setter dectared in an extension. The test checks that it is an error to call the setter. But for the enum we have a setter declared in the enum and a getter declared in the extension. Then we check that it is an error to call the getter. Why do we need additional extentions for the enum?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're checking the situation where the on declaration has a variable, a method, and a getter, and an extension has a setter.

So I thought we could have a corresponding set of tests where the on declaration has a setter, and an extension has a variable; the on declaration has a setter and an extension has a method; and the on declaration has a setter and an extension has a getter.

It might not be important or useful, but couldn't those scenarios cover different parts of the implementation of the tools?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it now. Makes sense. Added static_member_A04_t02.dart. PTAL.

Copy link
Contributor Author

@sgrekhov sgrekhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Typos are fixed. One question about additional extentions. PTAL.

}

extension ExtE on E {
static int get foo => 42;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify. In this test we have variable/getter/method declared in class/mixin/extension type and a setter dectared in an extension. The test checks that it is an error to call the setter. But for the enum we have a setter declared in the enum and a getter declared in the extension. Then we check that it is an error to call the getter. Why do we need additional extentions for the enum?

@sgrekhov sgrekhov requested a review from eernstg November 5, 2025 16:12
Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment thread still being resolved.

}

extension ExtE on E {
static int get foo => 42;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're checking the situation where the on declaration has a variable, a method, and a getter, and an extension has a setter.

So I thought we could have a corresponding set of tests where the on declaration has a setter, and an extension has a variable; the on declaration has a setter and an extension has a method; and the on declaration has a setter and an extension has a getter.

It might not be important or useful, but couldn't those scenarios cover different parts of the implementation of the tools?

@sgrekhov sgrekhov requested a review from eernstg November 7, 2025 14:53
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

Successfully merging this pull request may close these issues.

2 participants