Skip to content

Commit c955815

Browse files
RexJaeschkeBillWagner
authored andcommitted
variance safety for static interface members
1 parent db5b36e commit c955815

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

standard/interfaces.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ If a generic interface is declared in multiple parts ([§15.2.3](classes.md#1523
9494
9595
#### 19.2.3.2 Variance safety
9696
97-
The occurrence of variance annotations in the type parameter list of a type restricts the places where types can occur within the type declaration.
97+
The occurrence of variance annotations in the type parameter list of a type restricts the places where types can occur within the type declaration. However, these restrictions do not apply to occurrences of types within a declaration of a static member.
9898
99-
A type T is ***output-unsafe*** if one of the following holds:
99+
A type `T` is ***output-unsafe*** if one of the following holds:
100100
101101
- `T` is a contravariant type parameter
102102
- `T` is an array type with an output-unsafe element type
103103
- `T` is an interface or delegate type `Sᵢ,... Aₑ` constructed from a generic type `S<Xᵢ, ... Xₑ>` where for at least one `Aᵢ` one of the following holds:
104104
- `Xᵢ` is covariant or invariant and `Aᵢ` is output-unsafe.
105105
- `Xᵢ` is contravariant or invariant and `Aᵢ` is input-unsafe.
106106
107-
A type T is ***input-unsafe*** if one of the following holds:
107+
A type `T` is ***input-unsafe*** if one of the following holds:
108108
109109
- `T` is a covariant type parameter
110110
- `T` is an array type with an input-unsafe element type
111-
- `T` is an interface or delegate type `S<Aᵢ,... Aₑ>` constructed from a generic type `S<Xᵢ, ... Xₑ>` where for at least one `Aᵢ` one of the following holds:
111+
- `T` is an interface or delegate type `S<Aᵢ,... Aₑ>` constructed from a generic type `S<Xᵢ, ... Xₑ>` where for at least one `Aᵢ` one of the following holds:
112112
- `Xᵢ` is covariant or invariant and `Aᵢ` is input-unsafe.
113113
- `Xᵢ` is contravariant or invariant and `Aᵢ` is output-unsafe.
114114

0 commit comments

Comments
 (0)