mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 14:13:09 +00:00
b70145b56a
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> |
||
---|---|---|
.. | ||
language | ||
newsletter |