@@ -859,7 +859,7 @@ A compiler is not required to perform any static analysis nor is it required to
859
859
860
860
**The remainder of this subclause is conditionally normative .**
861
861
862
- #### 8.9.5.1 Flow analysis
862
+ #### §flow-analysis Flow analysis
863
863
864
864
A compiler that generates diagnostic warnings conforms to these rules .
865
865
@@ -1044,7 +1044,7 @@ A compiler may use any expression that dereferences a variable, property, or eve
1044
1044
>
1045
1045
> * end example *
1046
1046
1047
- #### 8.9.5.2 Type conversions
1047
+ #### §type-conversions Type conversions
1048
1048
1049
1049
A compiler that generates diagnostic warnings conforms to these rules .
1050
1050
@@ -1054,7 +1054,7 @@ A compiler may issue a warning when nullability annotations differ between two t
1054
1054
1055
1055
> *Example *: Types differing in top - level annotations
1056
1056
>
1057
- > < ! -- Example : {template : " code-in-class-lib" , name : " TopLevelNullabilityConversionWarnings" } -- >
1057
+ > < ! -- Example : {template : " code-in-class-lib" , name : " TopLevelNullabilityConversionWarnings" , ignoredWarnings : [ " CS8600 " ] } -- >
1058
1058
> ```csharp
1059
1059
> #nullable enable
1060
1060
> public class C
@@ -1073,10 +1073,12 @@ A compiler may issue a warning when nullability annotations differ between two t
1073
1073
> ```
1074
1074
>
1075
1075
> * end example *
1076
+ < ! -- markdownlint - disable MD028 -- >
1076
1077
1078
+ < ! -- markdownlint - enable MD028 -- >
1077
1079
> * Example * : Types differing in nested nullability annotations
1078
1080
>
1079
- > < ! -- Example : {template : " code-in-class-lib" , name : " NestedNullabilityConversionWarnings" } -- >
1081
+ > < ! -- Example : {template : " code-in-class-lib" , name : " NestedNullabilityConversionWarnings" , ignoredWarnings : [ " CS8619 " ] } -- >
1080
1082
> ```csharp
1081
1083
> #nullable enable
1082
1084
> public class C
@@ -1096,9 +1098,9 @@ A compiler may issue a warning when nullability annotations differ between two t
1096
1098
>
1097
1099
> * end example *
1098
1100
1099
- 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.
1101
+ 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 (§ 17 . 6 ) in determining whether to issue a warning for type conversions.
1100
1102
1101
- > <!-- Example: {template:"code-in-class-lib", name:"NullVariance"} -- >
1103
+ > <!-- Example: {template:"code-in-class-lib", name:"NullVariance", ignoredWarnings:["CS8619"] } -- >
1102
1104
> ```csharp
1103
1105
> #nullable enable
1104
1106
> public class C
@@ -1142,21 +1144,21 @@ A compiler may follow rules for interface variance ([§18.2.3.3](interfaces.md#1
1142
1144
1143
1145
A compiler may issue a warning when nullability differs in either direction in types which do not permit a variant conversion .
1144
1146
1145
- > < ! -- Example : {template : " code-in-class-lib" , name : " NullInvariance" } -- >
1147
+ > < ! -- Example : {template : " code-in-class-lib" , name : " NullInvariance" , ignoredWarnings : [ " CS8619 " ] } -- >
1146
1148
> ```csharp
1147
1149
> #nullable enable
1148
1150
> public class C
1149
1151
> {
1150
1152
> public void M1 (List < string > p )
1151
1153
> {
1152
1154
> List < string ? > v1 = p ; // Warning
1153
- > List < string ? > v1 = p ! ; // No warning
1155
+ > List < string ? > v2 = p ! ; // No warning
1154
1156
> }
1155
1157
>
1156
1158
> public void M2 (List < string ? > p )
1157
1159
> {
1158
1160
> List < string > v1 = p ; // Warning
1159
- > List < string > v1 = p ! ; // No warning
1161
+ > List < string > v2 = p ! ; // No warning
1160
1162
> }
1161
1163
> }
1162
1164
> ```
0 commit comments