-
Notifications
You must be signed in to change notification settings - Fork 29
#3330. Add static extensions tests. Part 2. #3382
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
base: master
Are you sure you want to change the base?
Conversation
eernstg
left a comment
There was a problem hiding this 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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
sgrekhov
left a comment
There was a problem hiding this 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; |
There was a problem hiding this comment.
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?
eernstg
left a comment
There was a problem hiding this 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; |
There was a problem hiding this comment.
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?
No description provided.