Skip to content
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

Closed
kasperl opened this issue Oct 14, 2013 · 4 comments
Closed
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@kasperl
Copy link

kasperl commented Oct 14, 2013

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.

@jwren
Copy link
Member

jwren commented Oct 14, 2013

cc @scheglov.
cc @bwilkerson.

@gbracha
Copy link
Contributor

gbracha commented Oct 14, 2013

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.

@gbracha
Copy link
Contributor

gbracha commented Oct 15, 2013

Issue #14125 has been merged into this issue.

@gbracha
Copy link
Contributor

gbracha commented Oct 21, 2013

We will be reverting the spec on this shortly.

@kasperl kasperl added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Oct 21, 2013
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@munificent munificent changed the title language: induced throwing setter for final fields shouldn't be part of interface Induced throwing setter for final fields shouldn't be part of interface Dec 15, 2016
natebosch added a commit to dart-lang/stack_trace that referenced this issue Apr 13, 2020
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.
natebosch added a commit to dart-lang/stack_trace that referenced this issue Apr 13, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

5 participants