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
{{ message }}
This repository was archived by the owner on Sep 27, 2019. It is now read-only.
The section on Type Parameters in Ch. 14 states the following (emphasis mine).
generic-type-parameter-variance indicates the variance for that parameter: + for covariance, - for contravariance. If generic-type-parameter-variance is omitted, covariance is assumed.
However, the default behavior for type parameters without a variance annotation appears to be invariant. If covariance were assumed, the following file should be error-free.
foo.php:9:7,8: Invalid argument (Typing[4110])
foo.php:5:16,18: This is a num (int/float)
foo.php:8:14,16: It is incompatible with an int
foo.php:5:16,18: Considering that this type argument is invariant with respect to A