You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is intentional, though we really need to improve the message here. The problem is that overriding the setter with a more specific type isn't sound. Code that is just setting the sink field of a Foo with a different EventSink<int> type could inadvertently violate the contract of Bar.
EventSink<int> sink = ...;
Foo f = ...;
f.sink = sink; // Can this ever fail?
Note, this is not a problem with getters. If you declared sink as a getter, you should be fine:
Dart VM version: 1.13.0-dev.7.4 (Tue Oct 27 15:05:26 2015) on "windows_x64"
gives
Error:(14, 3) Invalid override. The type of Bar.sink= ((BarSink) → void) is not a subtype of Foo.sink= ((EventSink<int>) → void).
The text was updated successfully, but these errors were encountered: