dart-sdk/docs
Erik Ernst b70145b56a Adjust covariant-from-class.md to specify strict overriding.
The covariant parameter related feature specs were written to specify
that overriding admits a type annotation `T` on a formal parameter as
long as `T <: S` or `S <: T` for every type annotation `S` on a
corresponding formal parameter in an overridden declaration (directly
or indirectly).

This CL changes the rules such that a covariant-from-class parameter
must satisfy the standard constraints (contravariance) instead, which
is needed in order to ensure that an important optimization (on self-
sends) is valid.

This makes the spec follow the actual implementation, i.e., the change
will not break any existing software.

Change-Id: Ic871cc16c09220a385d68d9ec32c7a06683db87b
Reviewed-on: https://dart-review.googlesource.com/37664
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2018-02-07 17:43:29 +00:00
..
language Adjust covariant-from-class.md to specify strict overriding. 2018-02-07 17:43:29 +00:00
newsletter Newsletter 2017-11-24. 2017-11-24 16:27:00 +00:00