| Index: pkg/dart_messages/lib/generated/shared_messages.json
|
| diff --git a/pkg/dart_messages/lib/generated/shared_messages.json b/pkg/dart_messages/lib/generated/shared_messages.json
|
| index a40bc3f808a805c07eeb407573a90a50a7488c1d..ae534adb10dd0d86f5eb77d69135337260de7292 100644
|
| --- a/pkg/dart_messages/lib/generated/shared_messages.json
|
| +++ b/pkg/dart_messages/lib/generated/shared_messages.json
|
| @@ -2,7 +2,9 @@
|
| "exampleMessage": {
|
| "id": "use an Id generated by bin/message_id.dart",
|
| "subId": 0,
|
| - "category": "AnalysisOptionsError",
|
| + "categories": [
|
| + "AnalysisOptionsError"
|
| + ],
|
| "template": "#use #named #arguments",
|
| "templateHoleOrder": [
|
| "arguments",
|
| @@ -23,7 +25,9 @@
|
| "CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY": {
|
| "id": "LGJGHW",
|
| "subId": 0,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Const constructor or factory can't have a body.",
|
| "templateHoleOrder": null,
|
| "howToFix": "Remove the 'const' keyword or the body.",
|
| @@ -39,7 +43,9 @@
|
| "CONST_CONSTRUCTOR_WITH_BODY": {
|
| "id": "LGJGHW",
|
| "subId": 1,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Const constructor can't have a body.",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing the 'const' keyword or the body.",
|
| @@ -54,7 +60,9 @@
|
| "CONST_FACTORY": {
|
| "id": "LGJGHW",
|
| "subId": 2,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Only redirecting factory constructors can be declared to be 'const'.",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing the 'const' keyword or replacing the body with '=' followed by a valid target.",
|
| @@ -69,7 +77,9 @@
|
| "EXTRANEOUS_MODIFIER": {
|
| "id": "GRKIQE",
|
| "subId": 0,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Can't have modifier '#{modifier}' here.",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing '#{modifier}'.",
|
| @@ -99,7 +109,9 @@
|
| "EXTRANEOUS_MODIFIER_REPLACE": {
|
| "id": "GRKIQE",
|
| "subId": 1,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Can't have modifier '#{modifier}' here.",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try replacing modifier '#{modifier}' with 'var', 'final', or a type.",
|
| @@ -117,7 +129,9 @@
|
| "CONST_CLASS": {
|
| "id": "GRKIQE",
|
| "subId": 2,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Classes can't be declared to be 'const'",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing the 'const' keyword or moving to the class' constructor(s).",
|
| @@ -132,7 +146,9 @@
|
| "CONST_METHOD": {
|
| "id": "GRKIQE",
|
| "subId": 3,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Getters, setters and methods can't be declared to be 'const'",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing the 'const' keyword.",
|
| @@ -152,7 +168,9 @@
|
| "CONST_ENUM": {
|
| "id": "GRKIQE",
|
| "subId": 4,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Enums can't be declared to be 'const'",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing the 'const' keyword.",
|
| @@ -167,7 +185,9 @@
|
| "CONST_TYPEDEF": {
|
| "id": "GRKIQE",
|
| "subId": 5,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Type aliases can't be declared to be 'const'",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing the 'const' keyword.",
|
| @@ -182,7 +202,9 @@
|
| "CONST_AND_FINAL": {
|
| "id": "GRKIQE",
|
| "subId": 6,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Members can't be declared to be both 'const' and 'final'",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing either the 'const' or 'final' keyword.",
|
| @@ -200,7 +222,9 @@
|
| "CONST_AND_VAR": {
|
| "id": "GRKIQE",
|
| "subId": 7,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Members can't be declared to be both 'const' and 'var'",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing either the 'const' or 'var' keyword.",
|
| @@ -218,7 +242,9 @@
|
| "CLASS_IN_CLASS": {
|
| "id": "DOTHQH",
|
| "subId": 0,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Classes can't be declared inside other classes.",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try moving the class to the top-level.",
|
| @@ -233,7 +259,9 @@
|
| "CONSTRUCTOR_WITH_RETURN_TYPE": {
|
| "id": "VOJBWY",
|
| "subId": 0,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Constructors can't have a return type",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing the return type.",
|
| @@ -249,7 +277,9 @@
|
| "MISSING_EXPRESSION_IN_THROW": {
|
| "id": "FTGGMJ",
|
| "subId": 0,
|
| - "category": "ParserError",
|
| + "categories": [
|
| + "ParserError"
|
| + ],
|
| "template": "Missing expression after 'throw'.",
|
| "templateHoleOrder": null,
|
| "howToFix": "Did you mean 'rethrow'?",
|
| @@ -266,7 +296,9 @@
|
| "RETHROW_OUTSIDE_CATCH": {
|
| "id": "MWETLC",
|
| "subId": 0,
|
| - "category": "CompileTimeError",
|
| + "categories": [
|
| + "CompileTimeError"
|
| + ],
|
| "template": "Rethrow must be inside of catch clause",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try moving the expression into a catch clause, or using a 'throw' expression.",
|
| @@ -282,7 +314,9 @@
|
| "RETURN_IN_GENERATIVE_CONSTRUCTOR": {
|
| "id": "UOTDQH",
|
| "subId": 0,
|
| - "category": "CompileTimeError",
|
| + "categories": [
|
| + "CompileTimeError"
|
| + ],
|
| "template": "Constructors can't return values.",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing the return statement or using a factory constructor.",
|
| @@ -298,7 +332,9 @@
|
| "RETURN_IN_GENERATOR": {
|
| "id": "JRUTUQ",
|
| "subId": 0,
|
| - "category": "CompileTimeError",
|
| + "categories": [
|
| + "CompileTimeError"
|
| + ],
|
| "template": "Can't return a value from a generator function (using the '#{modifier}' modifier).",
|
| "templateHoleOrder": null,
|
| "howToFix": "Try removing the value, replacing 'return' with 'yield' or changing the method body modifier",
|
| @@ -311,5 +347,72 @@
|
| " foo() async* { return 0; }\n main() => foo();\n ",
|
| " foo() sync* { return 0; }\n main() => foo();\n "
|
| ]
|
| + },
|
| + "NOT_ASSIGNABLE": {
|
| + "id": "FYQYXB",
|
| + "subId": 0,
|
| + "categories": [
|
| + "StaticTypeWarning"
|
| + ],
|
| + "template": "'#{fromType}' is not assignable to '#{toType}'.",
|
| + "templateHoleOrder": null,
|
| + "howToFix": null,
|
| + "options": null,
|
| + "usedBy": [
|
| + "Platform.dart2js"
|
| + ],
|
| + "examples": null
|
| + },
|
| + "FORIN_NOT_ASSIGNABLE": {
|
| + "id": "FYQYXB",
|
| + "subId": 1,
|
| + "categories": [
|
| + "Hint"
|
| + ],
|
| + "template": "The element type '#{currentType}' of '#{expressionType}' is not assignable to '#{elementType}'.",
|
| + "templateHoleOrder": null,
|
| + "howToFix": null,
|
| + "options": null,
|
| + "usedBy": [
|
| + "Platform.dart2js"
|
| + ],
|
| + "examples": [
|
| + " main() {\n List<int> list = <int>[1, 2];\n for (String x in list) x;\n }\n "
|
| + ]
|
| + },
|
| + "RETURN_OF_INVALID_TYPE": {
|
| + "id": "FYQYXB",
|
| + "subId": 2,
|
| + "categories": [
|
| + "StaticTypeWarning"
|
| + ],
|
| + "template": "The return type '#{fromType}' is not a '#{toType}', as defined by the method '#{method}'.",
|
| + "templateHoleOrder": null,
|
| + "howToFix": null,
|
| + "options": null,
|
| + "usedBy": [
|
| + "Platform.analyzer"
|
| + ],
|
| + "examples": [
|
| + "int foo() => 'foo'; main() { foo(); }"
|
| + ]
|
| + },
|
| + "ARGUMENT_TYPE_NOT_ASSIGNABLE": {
|
| + "id": "FYQYXB",
|
| + "subId": 3,
|
| + "categories": [
|
| + "Hint",
|
| + "StaticWarning"
|
| + ],
|
| + "template": "The argument type '#{fromType}' cannot be assigned to the parameter type '#{toType}'.",
|
| + "templateHoleOrder": null,
|
| + "howToFix": null,
|
| + "options": null,
|
| + "usedBy": [
|
| + "Platform.analyzer"
|
| + ],
|
| + "examples": [
|
| + "foo(int x) => x; main() { foo('bar'); }"
|
| + ]
|
| }
|
| }
|
|
|