-
Notifications
You must be signed in to change notification settings - Fork 1.7k
CFE and analyzer disagree on getter/setter consistency requirements #36679
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
Comments
The current specification says: It is a static warning if a class has
a setter named \code{$v$=} with argument type $T$ and
a getter named $v$ with return type $S$,
and $S$ may not be assigned to $T$. With that, the first error should be a warning. The getter/setter-type-incompatibility issue was one of the warnings-turned-errors-turned-warnings-again, but if the analyzer has successfully made it an error, maybe we can keep it as an error. |
It does seem to be an error currently, so we could consider keeping it. |
Issues #36126 and #36127 report on the fact that both the analyzer and DDC report errors where the spec says 'static warning'. The vm and dart2js do not report anything, which would be fine if it's a warning. So one way to settle this is to say (1) all those warnings which are currently reported as errors by the analyzer and DDC remain errors (and we adjust the spec for that again), and then (2) the common front end needs to report those errors as well. @leafpetersen, @lrhn, @munificent, can you support that? |
LGTM. |
1 similar comment
LGTM. |
This has been implemented today. |
The CFE accepts this code with no errors:
The analyzer rejects it with the following error messages:
@eernstg Can you verify which behavior is consistent with the spec and then re-assign to the appropriate area and team?
cc @stereotype441 @kmillikin
The text was updated successfully, but these errors were encountered: