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
Induced throwing setter for final fields shouldn't be part of interface #14075
Comments
cc @scheglov. |
FWIW, I do not believe that the there was real problem with the original rules. I am happy to go back to them. I will also look into what fixes we can make in the spirit of the current rules, but I am concerned that they will be be patches that lead us to more problems rather than less. Added Accepted label. |
Issue #14125 has been merged into this issue. |
We will be reverting the spec on this shortly. |
dart-lang/sdk#14075 has been closed for a long time. This class in not in the public interface for the package so it should not be breaking to remove the throwing setter.
dart-lang/sdk#14075 has been closed for a long time. This class in not in the public interface for the package so it should not be breaking to remove the throwing setter.
It feels weird that the throwing setter for final fields becomes part of the implied interface for the enclosing class. This code just stopped working in the sense that it now tells me that PolarPoint doesn't implement the Point interface.
class Point {
final x, y;
Point(this.x, this.y);
}
class PolarPoint implements Point {
PolarPoint(...);
get x => ...;
get y => ...;
}
That seems very unfortunate.
The text was updated successfully, but these errors were encountered: