Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/error.dart |
| diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart |
| index a783e7e18e2ccc64feef5a3337cf0fb6ded999ff..aacb26d3c9d6d24433e477236ffd61140dc8eb3b 100644 |
| --- a/pkg/analyzer/lib/src/generated/error.dart |
| +++ b/pkg/analyzer/lib/src/generated/error.dart |
| @@ -456,12 +456,23 @@ class CheckedModeCompileTimeErrorCode extends Enum<CheckedModeCompileTimeErrorCo |
| */ |
| static const CheckedModeCompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = const CheckedModeCompileTimeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 4, "The element type '{0}' cannot be assigned to the map value type '{1}'"); |
| + /** |
| + * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an |
| + * uncaught exception being thrown. |
| + */ |
| + static const CheckedModeCompileTimeErrorCode VARIABLE_TYPE_MISMATCH = |
| + const CheckedModeCompileTimeErrorCode.con1( |
| + 'VARIABLE_TYPE_MISMATCH', |
| + 5, |
| + "The object type '{0}' cannot be assigned to a variable of type '{1}'"); |
|
Brian Wilkerson
2014/10/10 21:23:45
"variable" --> "const variable"?
It might be more
Paul Berry
2014/10/10 21:56:38
Good point. I've added a TODO comment for now. I
|
| + |
| static const List<CheckedModeCompileTimeErrorCode> values = const [ |
| CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, |
| CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, |
| LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, |
| MAP_KEY_TYPE_NOT_ASSIGNABLE, |
| - MAP_VALUE_TYPE_NOT_ASSIGNABLE]; |
| + MAP_VALUE_TYPE_NOT_ASSIGNABLE, |
| + VARIABLE_TYPE_MISMATCH]; |
| /** |
| * The template used to create the message to be displayed for this error. |