@@ -24740,9 +24740,9 @@ WarningCode:
24740
24740
documentation: |-
24741
24741
#### Description
24742
24742
24743
- The analyzer produces this diagnostic when
24744
- - the language option `strict-inference` has been enabled in the analysis options file,
24745
- - a list, map or set literal doesn't have type arguments, and
24743
+ The analyzer produces this diagnostic when:
24744
+ - the language option `strict-inference` is enabled in the analysis options file,
24745
+ - a list, map, or set literal has no type arguments, and
24746
24746
- the values for the type arguments can't be inferred from the elements.
24747
24747
24748
24748
#### Example
@@ -24756,8 +24756,8 @@ WarningCode:
24756
24756
strict-inference: true
24757
24757
```
24758
24758
24759
- The following code produces this diagnostic because the type of the
24760
- elements of the list literal can't be inferred by the analyzer :
24759
+ The following code produces this diagnostic because the type of the list
24760
+ literal's elements can't be inferred:
24761
24761
24762
24762
```dart
24763
24763
void f() {
@@ -24788,9 +24788,9 @@ WarningCode:
24788
24788
documentation: |-
24789
24789
#### Description
24790
24790
24791
- The analyzer produces this diagnostic when
24792
- - the language option `strict-inference` has been enabled in the analysis options file,
24793
- - the invocation of a method or function doesn't have type arguments, and
24791
+ The analyzer produces this diagnostic when:
24792
+ - the language option `strict-inference` is enabled in the analysis options file,
24793
+ - the invocation of a method or function has no type arguments, and
24794
24794
- the values for the type arguments can't be inferred.
24795
24795
24796
24796
#### Example
@@ -24804,9 +24804,8 @@ WarningCode:
24804
24804
strict-inference: true
24805
24805
```
24806
24806
24807
- The following code produces this diagnostic because the invocation of the
24808
- method `m` doesn't have type arguments and the type arguments can't be
24809
- inferred:
24807
+ The following code produces this diagnostic because the invocation of `m`
24808
+ has no explicit type arguments, and the arguments can't be inferred:
24810
24809
24811
24810
```dart
24812
24811
abstract class C {
@@ -24833,7 +24832,8 @@ WarningCode:
24833
24832
```
24834
24833
INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE:
24835
24834
parameters:
24836
- String p0: the name of the function or method whose return type couldn't be inferred
24835
+ String p0: the name of the function or method whose return type can't be
24836
+ inferred
24837
24837
problemMessage: "The return type of '#p0' can't be inferred."
24838
24838
correctionMessage: "Declare the return type of '#p0'."
24839
24839
hasPublishedDocs: false
@@ -24846,9 +24846,9 @@ WarningCode:
24846
24846
documentation: |-
24847
24847
#### Description
24848
24848
24849
- The analyzer produces this diagnostic when
24850
- - the language option `strict-inference` has been enabled in the analysis options file,
24851
- - the declaration of a method or function doesn't have a return type, and
24849
+ The analyzer produces this diagnostic when:
24850
+ - the language option `strict-inference` is enabled in the analysis options file,
24851
+ - the declaration of a method or function has no return type, and
24852
24852
- the return type can't be inferred.
24853
24853
24854
24854
#### Example
@@ -24911,9 +24911,9 @@ WarningCode:
24911
24911
documentation: |-
24912
24912
#### Description
24913
24913
24914
- The analyzer produces this diagnostic when
24915
- - the language option `strict-inference` has been enabled in the analysis options file,
24916
- - the declaration of a variable doesn't have a type, and
24914
+ The analyzer produces this diagnostic when:
24915
+ - the language option `strict-inference` is enabled in the analysis options file,
24916
+ - the declaration of a variable has no type, and
24917
24917
- the type of the variable can't be inferred.
24918
24918
24919
24919
#### Example
@@ -24954,13 +24954,13 @@ WarningCode:
24954
24954
documentation: |-
24955
24955
#### Description
24956
24956
24957
- The analyzer produces this diagnostic when
24958
- - the language option `strict-inference` has been enabled in the analysis options file,
24959
- - the declaration of a formal parameter doesn't have a type, and
24957
+ The analyzer produces this diagnostic when:
24958
+ - the language option `strict-inference` is enabled in the analysis options file,
24959
+ - the declaration of a formal parameter has no type, and
24960
24960
- the type of the parameter can't be inferred.
24961
24961
24962
- The type of a parameter of a method can be inferred if the method
24963
- overrides an inherited method.
24962
+ The type of a method's parameter can be inferred if it overrides an
24963
+ inherited method.
24964
24964
24965
24965
#### Example
24966
24966
@@ -27120,13 +27120,13 @@ WarningCode:
27120
27120
documentation: |-
27121
27121
#### Description
27122
27122
27123
- The analyzer produces this diagnostic when the type of the object being
27124
- matched can't ever be matched by the pattern.
27123
+ The analyzer produces this diagnostic when the object's type can't be
27124
+ matched by the pattern.
27125
27125
27126
27126
#### Example
27127
27127
27128
- The following code produces this diagnostic because a `double` is being
27129
- matched by a pattern that requires an `int`, which can never succeed:
27128
+ The following code produces this diagnostic because a `double` is matched
27129
+ by an `int` pattern , which can never succeed:
27130
27130
27131
27131
```dart
27132
27132
void f(String? s) {
@@ -27136,16 +27136,16 @@ WarningCode:
27136
27136
27137
27137
#### Common fixes
27138
27138
27139
- If one of the types is wrong, then change one or both of the types so that
27140
- the pattern can succeed:
27139
+ If one of the types is wrong, then change one or both so the pattern match
27140
+ can succeed:
27141
27141
27142
27142
```dart
27143
27143
void f(String? s) {
27144
27144
if (s case String _) {}
27145
27145
}
27146
27146
```
27147
27147
27148
- If the types aren't wrong , then remove the pattern match:
27148
+ If the types are correct , then remove the pattern match:
27149
27149
27150
27150
```dart
27151
27151
void f(double x) {}
@@ -27243,8 +27243,8 @@ WarningCode:
27243
27243
#### Description
27244
27244
27245
27245
The analyzer produces this diagnostic when a lint that has been removed is
27246
- used in an analysis options file. Because the lint has been removed, the
27247
- reference to it (such as enabling it) will have no effect.
27246
+ used in an analysis options file. Because the lint no longer exists,
27247
+ referencing it will have no effect.
27248
27248
27249
27249
#### Example
27250
27250
@@ -27496,7 +27496,7 @@ WarningCode:
27496
27496
SDK_VERSION_CONSTRUCTOR_TEAROFFS:
27497
27497
parameters: none
27498
27498
problemMessage: "Tearing off a constructor requires the 'constructor-tearoffs' language feature."
27499
- correctionMessage: "Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'."
27499
+ correctionMessage: "Try updating your ' pubspec.yaml' to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'."
27500
27500
hasPublishedDocs: true
27501
27501
comment: |-
27502
27502
There is also a [ParserErrorCode.experimentNotEnabled] code which
0 commit comments