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
@@ -843,6 +844,7 @@ A *lower-bound inference from* a type `U` *to* a type `V` is made as follows:
843
844
- `V` isoneof `IEnumerable<V₁>`, `ICollection<V₁>`, `IReadOnlyList<V₁>>`, `IReadOnlyCollection<V₁>` or `IList<V₁>` and `U` isasingle-dimensionalarraytype `U₁[]`
844
845
- `V` isaconstructed `class`, `struct`, `interface` or `delegate` type `C<V₁...Vₑ>` and there is a unique type `C<U₁...Uₑ>` such that `U` (or, if `U` isa type `parameter`, itseffectivebaseclassoranymemberofitseffectiveinterfaceset) is identical to, `inherits` from (directlyorindirectly), orimplements (directlyorindirectly) `C<U₁...Uₑ>`.
845
846
- (The “uniqueness” restrictionmeansthatinthecaseinterface `C<T>{} classU: C<X>, C<Y>{}`, thennoinferenceismade when inferring from `U` to `C<T>` because `U₁` could be `X` or `Y`.)
- Otherwise, if `U` isanarraytypethena *lower-boundinference* ismade
@@ -863,6 +865,7 @@ An *upper-bound inference from* a type `U` *to* a type `V` is made as follows:
863
865
- `U` isthetype `U1?` and `V` isthetype `V1?`
864
866
- `U` isconstructedclass, struct, interfaceordelegate type `C<U₁...Uₑ>` and `V` is a `class, struct, interface` or `delegate` type which is `identical` to, `inherits` from (directlyorindirectly), orimplements (directlyorindirectly) auniquetype `C<V₁...Vₑ>`
865
867
- (The “uniqueness” restrictionmeansthatgivenaninterface `C<T>{} classV<Z>:C<X<Z>>, C<Y<Z>>{}`, thennoinferenceismade when inferring from `C<U₁>` to `V<Q>`. Inferences are not made from `U₁` to either `X<Q>` or `Y<Q>`.)
0 commit comments