-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[VM] Setters cannot conflict with methods #5840
Comments
class C { main() { Error: line 17 pos 3: field or method 'foo' already defined From the language spec: "The name of a setter is obtained by appending the string `=' to the identifier given in its signature. Hence, a setter name can never conflict with, override or be overridden by a getter or method." |
This comment was originally written by rodion...@unipro.ru From what I understand, the '=' character is appended to the setter name internally, for the sake of simplifying lookup |
Language/07_Classes/3_Setters_A04_t01 is still failing: out/DebugIA32/dart ../tests/co19/src/Language/07_Classes/3_Setters_A04_t01.dart Added Triaged label. |
Language/07_Classes/3_Setters_A04_t04 and Language/07_Classes/3_Setters_A04_t05 fail with the same error: out/DebugIA32/dart ../tests/co19/src/Language/07_Classes/3_Setters_A04_t04.dart |
This comment was originally written by @mhausner Both co19 tests referenced above are wrong, or I should say expect the wrong outcome. They both define an abstract setter that is then invoked. This will result in a runtime error (not a compile time error). The VM is doing the right thing here. Filed co19 issue #383. Added Fixed label. |
This issue was originally filed by rodion...@unipro.ru
similar bug has been fixed in Analyzer, but VM fails the following co19 tests:
Language/07_Classes/3_Setters_A04_t01
and Language/07_Classes/3_Setters_A04_t02
VM r13590
The text was updated successfully, but these errors were encountered: