When an explicitly defined type variable is used in an incorrect
variance position in a method (whether in the return or the
parameters), an error is emitted.
Change-Id: I7e49687579bb2ce6e293b052b657b98741cb04f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122740
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
These test basic correct usages of variance modifiers in fields
and methods.
Erroneous usages will come in a future CL, as well as more complex
examples + subclassing.
Change-Id: I05d547ac1db9e22235a0bf64b05fcb3e119e3157
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119169
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>