Skip to content

Commit 5ff046a

Browse files
committed
Nits
1 parent 9ae0fe6 commit 5ff046a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

standard/types.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,11 @@ A compiler may use any expression that dereferences a variable, property, or eve
10461046
10471047
#### 8.9.5.2 Type conversions
10481048
1049-
For the purpose of determining whether a conversion is *permitted*, a compiler must consider every nullable-annotated type to be equivalent to its unannotated version. The compiler may however issue warnings if the annotations of the types are not compatible.
1049+
For the purpose of determining whether a conversion is *permitted*, a compiler must consider every nullable-annotated type to be equivalent to its unannotated version. A compiler may issue warnings if the annotations of the types are not compatible.
10501050
10511051
(examples: `List<string>` to `IEnumerable<object?>`, or `List<string?>?` to `IEnumerable<object>`, ...)
10521052
1053-
A compiler may follow rules for interface variance ([§18.2.3.3](interfaces.md#18233-variance-conversion)), delegate variance ([§20.4](delegates.md#204-delegate-compatibility)), and array covariance ([§1.7.6](arrays.md#176-array-covariance)) in determining whether to issue a warning for type conversions.
1053+
A compiler may follow rules for interface variance ([§18.2.3.3](interfaces.md#18233-variance-conversion)), delegate variance ([§20.4](delegates.md#204-delegate-compatibility)), and array covariance ([§1.7.6](arrays.md#176-array-covariance)) in determining whether to issue a warning for type conversions.
10541054
(Do we need to list each type here? E.g. tuple types...)
10551055
10561056
> <!-- Example: {template:"code-in-class-lib", name:"NullVariance"} -->
@@ -1095,7 +1095,7 @@ A compiler may follow rules for interface variance ([§18.2.3.3](interfaces.md#1
10951095
>
10961096
> *end example*
10971097
1098-
Types that are invariant likewise may produce a warning when the conversion differs only in the nullability of type arguments.
1098+
A compiler may issue a warning when nullability differs in either direction in types which do not permit a variant conversion.
10991099
11001100
> <!-- Example: {template:"code-in-class-lib", name:"NullInvariance"} -->
11011101
> ```csharp

0 commit comments

Comments
 (0)