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
In cases where the supertype authors did not foresee this need, it is still possible to tighten a parameter type by putting the covariant modifier on the overriding parameter declaration.
The text was updated successfully, but these errors were encountered:
It looks like you have not included any tickets in the title of this issue. Please create a ticket for this issue, or click here to have Rosie create one for you.
Dart 1.22 recently added support for covariant overrides, which allows for sound tightening of method argument types.
This applies to fields/setters as well.
Currently, you cannot tighten the type of a prop in strong mode.
However, with
covariant
, that should now be possible:The transformer needs to be updated to generate setters with the
covariant
keyword when necessary.Also worth noting:
The text was updated successfully, but these errors were encountered: