| OLD | NEW |
| 1 { | 1 { |
| 2 "exampleMessage": { | 2 "exampleMessage": { |
| 3 "id": "use an Id generated by bin/message_id.dart", | 3 "id": "use an Id generated by bin/message_id.dart", |
| 4 "subId": 0, | 4 "subId": 0, |
| 5 "category": "AnalysisOptionsError", | 5 "categories": [ |
| 6 "AnalysisOptionsError" |
| 7 ], |
| 6 "template": "#use #named #arguments", | 8 "template": "#use #named #arguments", |
| 7 "templateHoleOrder": [ | 9 "templateHoleOrder": [ |
| 8 "arguments", | 10 "arguments", |
| 9 "named", | 11 "named", |
| 10 "use" | 12 "use" |
| 11 ], | 13 ], |
| 12 "howToFix": "an explanation on how to fix things", | 14 "howToFix": "an explanation on how to fix things", |
| 13 "options": null, | 15 "options": null, |
| 14 "usedBy": [], | 16 "usedBy": [], |
| 15 "examples": [ | 17 "examples": [ |
| 16 " Some multiline example;\n That generates the bug.", | 18 " Some multiline example;\n That generates the bug.", |
| 17 { | 19 { |
| 18 "fileA.dart": " or a map from file to content.\n again mul
tiline", | 20 "fileA.dart": " or a map from file to content.\n again mul
tiline", |
| 19 "fileB.dart": " with possibly multiple files.\n muliline t
oo" | 21 "fileB.dart": " with possibly multiple files.\n muliline t
oo" |
| 20 } | 22 } |
| 21 ] | 23 ] |
| 22 }, | 24 }, |
| 23 "CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY": { | 25 "CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY": { |
| 24 "id": "LGJGHW", | 26 "id": "LGJGHW", |
| 25 "subId": 0, | 27 "subId": 0, |
| 26 "category": "ParserError", | 28 "categories": [ |
| 29 "ParserError" |
| 30 ], |
| 27 "template": "Const constructor or factory can't have a body.", | 31 "template": "Const constructor or factory can't have a body.", |
| 28 "templateHoleOrder": null, | 32 "templateHoleOrder": null, |
| 29 "howToFix": "Remove the 'const' keyword or the body.", | 33 "howToFix": "Remove the 'const' keyword or the body.", |
| 30 "options": null, | 34 "options": null, |
| 31 "usedBy": [ | 35 "usedBy": [ |
| 32 "Platform.dart2js" | 36 "Platform.dart2js" |
| 33 ], | 37 ], |
| 34 "examples": [ | 38 "examples": [ |
| 35 " class C {\n const C() {}\n }\n\n main(
) => new C();", | 39 " class C {\n const C() {}\n }\n\n main(
) => new C();", |
| 36 " class C {\n const factory C() {}\n }\n\n
main() => new C();" | 40 " class C {\n const factory C() {}\n }\n\n
main() => new C();" |
| 37 ] | 41 ] |
| 38 }, | 42 }, |
| 39 "CONST_CONSTRUCTOR_WITH_BODY": { | 43 "CONST_CONSTRUCTOR_WITH_BODY": { |
| 40 "id": "LGJGHW", | 44 "id": "LGJGHW", |
| 41 "subId": 1, | 45 "subId": 1, |
| 42 "category": "ParserError", | 46 "categories": [ |
| 47 "ParserError" |
| 48 ], |
| 43 "template": "Const constructor can't have a body.", | 49 "template": "Const constructor can't have a body.", |
| 44 "templateHoleOrder": null, | 50 "templateHoleOrder": null, |
| 45 "howToFix": "Try removing the 'const' keyword or the body.", | 51 "howToFix": "Try removing the 'const' keyword or the body.", |
| 46 "options": null, | 52 "options": null, |
| 47 "usedBy": [ | 53 "usedBy": [ |
| 48 "Platform.analyzer" | 54 "Platform.analyzer" |
| 49 ], | 55 ], |
| 50 "examples": [ | 56 "examples": [ |
| 51 " class C {\n const C() {}\n }\n\n main(
) => new C();" | 57 " class C {\n const C() {}\n }\n\n main(
) => new C();" |
| 52 ] | 58 ] |
| 53 }, | 59 }, |
| 54 "CONST_FACTORY": { | 60 "CONST_FACTORY": { |
| 55 "id": "LGJGHW", | 61 "id": "LGJGHW", |
| 56 "subId": 2, | 62 "subId": 2, |
| 57 "category": "ParserError", | 63 "categories": [ |
| 64 "ParserError" |
| 65 ], |
| 58 "template": "Only redirecting factory constructors can be declared to be 'co
nst'.", | 66 "template": "Only redirecting factory constructors can be declared to be 'co
nst'.", |
| 59 "templateHoleOrder": null, | 67 "templateHoleOrder": null, |
| 60 "howToFix": "Try removing the 'const' keyword or replacing the body with '='
followed by a valid target.", | 68 "howToFix": "Try removing the 'const' keyword or replacing the body with '='
followed by a valid target.", |
| 61 "options": null, | 69 "options": null, |
| 62 "usedBy": [ | 70 "usedBy": [ |
| 63 "Platform.analyzer" | 71 "Platform.analyzer" |
| 64 ], | 72 ], |
| 65 "examples": [ | 73 "examples": [ |
| 66 " class C {\n const factory C() {}\n }\n\n
main() => new C();" | 74 " class C {\n const factory C() {}\n }\n\n
main() => new C();" |
| 67 ] | 75 ] |
| 68 }, | 76 }, |
| 69 "EXTRANEOUS_MODIFIER": { | 77 "EXTRANEOUS_MODIFIER": { |
| 70 "id": "GRKIQE", | 78 "id": "GRKIQE", |
| 71 "subId": 0, | 79 "subId": 0, |
| 72 "category": "ParserError", | 80 "categories": [ |
| 81 "ParserError" |
| 82 ], |
| 73 "template": "Can't have modifier '#{modifier}' here.", | 83 "template": "Can't have modifier '#{modifier}' here.", |
| 74 "templateHoleOrder": null, | 84 "templateHoleOrder": null, |
| 75 "howToFix": "Try removing '#{modifier}'.", | 85 "howToFix": "Try removing '#{modifier}'.", |
| 76 "options": null, | 86 "options": null, |
| 77 "usedBy": [ | 87 "usedBy": [ |
| 78 "Platform.dart2js" | 88 "Platform.dart2js" |
| 79 ], | 89 ], |
| 80 "examples": [ | 90 "examples": [ |
| 81 "var String foo; main(){}", | 91 "var String foo; main(){}", |
| 82 "var set foo; main(){}", | 92 "var set foo; main(){}", |
| 83 "var final foo; main(){}", | 93 "var final foo; main(){}", |
| 84 "var var foo; main(){}", | 94 "var var foo; main(){}", |
| 85 "var const foo; main(){}", | 95 "var const foo; main(){}", |
| 86 "var abstract foo; main(){}", | 96 "var abstract foo; main(){}", |
| 87 "var static foo; main(){}", | 97 "var static foo; main(){}", |
| 88 "var external foo; main(){}", | 98 "var external foo; main(){}", |
| 89 "get var foo; main(){}", | 99 "get var foo; main(){}", |
| 90 "set var foo; main(){}", | 100 "set var foo; main(){}", |
| 91 "final var foo; main(){}", | 101 "final var foo; main(){}", |
| 92 "var var foo; main(){}", | 102 "var var foo; main(){}", |
| 93 "const var foo; main(){}", | 103 "const var foo; main(){}", |
| 94 "abstract var foo; main(){}", | 104 "abstract var foo; main(){}", |
| 95 "static var foo; main(){}", | 105 "static var foo; main(){}", |
| 96 "external var foo; main(){}" | 106 "external var foo; main(){}" |
| 97 ] | 107 ] |
| 98 }, | 108 }, |
| 99 "EXTRANEOUS_MODIFIER_REPLACE": { | 109 "EXTRANEOUS_MODIFIER_REPLACE": { |
| 100 "id": "GRKIQE", | 110 "id": "GRKIQE", |
| 101 "subId": 1, | 111 "subId": 1, |
| 102 "category": "ParserError", | 112 "categories": [ |
| 113 "ParserError" |
| 114 ], |
| 103 "template": "Can't have modifier '#{modifier}' here.", | 115 "template": "Can't have modifier '#{modifier}' here.", |
| 104 "templateHoleOrder": null, | 116 "templateHoleOrder": null, |
| 105 "howToFix": "Try replacing modifier '#{modifier}' with 'var', 'final', or a
type.", | 117 "howToFix": "Try replacing modifier '#{modifier}' with 'var', 'final', or a
type.", |
| 106 "options": null, | 118 "options": null, |
| 107 "usedBy": [ | 119 "usedBy": [ |
| 108 "Platform.dart2js" | 120 "Platform.dart2js" |
| 109 ], | 121 ], |
| 110 "examples": [ | 122 "examples": [ |
| 111 "set foo; main(){}", | 123 "set foo; main(){}", |
| 112 "abstract foo; main(){}", | 124 "abstract foo; main(){}", |
| 113 "static foo; main(){}", | 125 "static foo; main(){}", |
| 114 "external foo; main(){}" | 126 "external foo; main(){}" |
| 115 ] | 127 ] |
| 116 }, | 128 }, |
| 117 "CONST_CLASS": { | 129 "CONST_CLASS": { |
| 118 "id": "GRKIQE", | 130 "id": "GRKIQE", |
| 119 "subId": 2, | 131 "subId": 2, |
| 120 "category": "ParserError", | 132 "categories": [ |
| 133 "ParserError" |
| 134 ], |
| 121 "template": "Classes can't be declared to be 'const'", | 135 "template": "Classes can't be declared to be 'const'", |
| 122 "templateHoleOrder": null, | 136 "templateHoleOrder": null, |
| 123 "howToFix": "Try removing the 'const' keyword or moving to the class' constr
uctor(s).", | 137 "howToFix": "Try removing the 'const' keyword or moving to the class' constr
uctor(s).", |
| 124 "options": null, | 138 "options": null, |
| 125 "usedBy": [ | 139 "usedBy": [ |
| 126 "Platform.analyzer" | 140 "Platform.analyzer" |
| 127 ], | 141 ], |
| 128 "examples": [ | 142 "examples": [ |
| 129 " const class C {}\n\n main() => new C();\n " | 143 " const class C {}\n\n main() => new C();\n " |
| 130 ] | 144 ] |
| 131 }, | 145 }, |
| 132 "CONST_METHOD": { | 146 "CONST_METHOD": { |
| 133 "id": "GRKIQE", | 147 "id": "GRKIQE", |
| 134 "subId": 3, | 148 "subId": 3, |
| 135 "category": "ParserError", | 149 "categories": [ |
| 150 "ParserError" |
| 151 ], |
| 136 "template": "Getters, setters and methods can't be declared to be 'const'", | 152 "template": "Getters, setters and methods can't be declared to be 'const'", |
| 137 "templateHoleOrder": null, | 153 "templateHoleOrder": null, |
| 138 "howToFix": "Try removing the 'const' keyword.", | 154 "howToFix": "Try removing the 'const' keyword.", |
| 139 "options": null, | 155 "options": null, |
| 140 "usedBy": [ | 156 "usedBy": [ |
| 141 "Platform.analyzer" | 157 "Platform.analyzer" |
| 142 ], | 158 ], |
| 143 "examples": [ | 159 "examples": [ |
| 144 "const int foo() => 499; main() {}", | 160 "const int foo() => 499; main() {}", |
| 145 "const int get foo => 499; main() {}", | 161 "const int get foo => 499; main() {}", |
| 146 "const set foo(v) => 499; main() {}", | 162 "const set foo(v) => 499; main() {}", |
| 147 "class A { const int foo() => 499; } main() { new A(); }", | 163 "class A { const int foo() => 499; } main() { new A(); }", |
| 148 "class A { const int get foo => 499; } main() { new A(); }", | 164 "class A { const int get foo => 499; } main() { new A(); }", |
| 149 "class A { const set foo(v) => 499; } main() { new A(); }" | 165 "class A { const set foo(v) => 499; } main() { new A(); }" |
| 150 ] | 166 ] |
| 151 }, | 167 }, |
| 152 "CONST_ENUM": { | 168 "CONST_ENUM": { |
| 153 "id": "GRKIQE", | 169 "id": "GRKIQE", |
| 154 "subId": 4, | 170 "subId": 4, |
| 155 "category": "ParserError", | 171 "categories": [ |
| 172 "ParserError" |
| 173 ], |
| 156 "template": "Enums can't be declared to be 'const'", | 174 "template": "Enums can't be declared to be 'const'", |
| 157 "templateHoleOrder": null, | 175 "templateHoleOrder": null, |
| 158 "howToFix": "Try removing the 'const' keyword.", | 176 "howToFix": "Try removing the 'const' keyword.", |
| 159 "options": null, | 177 "options": null, |
| 160 "usedBy": [ | 178 "usedBy": [ |
| 161 "Platform.analyzer" | 179 "Platform.analyzer" |
| 162 ], | 180 ], |
| 163 "examples": [ | 181 "examples": [ |
| 164 "const enum Foo { x } main() {}" | 182 "const enum Foo { x } main() {}" |
| 165 ] | 183 ] |
| 166 }, | 184 }, |
| 167 "CONST_TYPEDEF": { | 185 "CONST_TYPEDEF": { |
| 168 "id": "GRKIQE", | 186 "id": "GRKIQE", |
| 169 "subId": 5, | 187 "subId": 5, |
| 170 "category": "ParserError", | 188 "categories": [ |
| 189 "ParserError" |
| 190 ], |
| 171 "template": "Type aliases can't be declared to be 'const'", | 191 "template": "Type aliases can't be declared to be 'const'", |
| 172 "templateHoleOrder": null, | 192 "templateHoleOrder": null, |
| 173 "howToFix": "Try removing the 'const' keyword.", | 193 "howToFix": "Try removing the 'const' keyword.", |
| 174 "options": null, | 194 "options": null, |
| 175 "usedBy": [ | 195 "usedBy": [ |
| 176 "Platform.analyzer" | 196 "Platform.analyzer" |
| 177 ], | 197 ], |
| 178 "examples": [ | 198 "examples": [ |
| 179 "const typedef void Foo(); main() {}" | 199 "const typedef void Foo(); main() {}" |
| 180 ] | 200 ] |
| 181 }, | 201 }, |
| 182 "CONST_AND_FINAL": { | 202 "CONST_AND_FINAL": { |
| 183 "id": "GRKIQE", | 203 "id": "GRKIQE", |
| 184 "subId": 6, | 204 "subId": 6, |
| 185 "category": "ParserError", | 205 "categories": [ |
| 206 "ParserError" |
| 207 ], |
| 186 "template": "Members can't be declared to be both 'const' and 'final'", | 208 "template": "Members can't be declared to be both 'const' and 'final'", |
| 187 "templateHoleOrder": null, | 209 "templateHoleOrder": null, |
| 188 "howToFix": "Try removing either the 'const' or 'final' keyword.", | 210 "howToFix": "Try removing either the 'const' or 'final' keyword.", |
| 189 "options": null, | 211 "options": null, |
| 190 "usedBy": [ | 212 "usedBy": [ |
| 191 "Platform.analyzer" | 213 "Platform.analyzer" |
| 192 ], | 214 ], |
| 193 "examples": [ | 215 "examples": [ |
| 194 "final const int x = 499; main() {}", | 216 "final const int x = 499; main() {}", |
| 195 "const final int x = 499; main() {}", | 217 "const final int x = 499; main() {}", |
| 196 "class A { static final const int x = 499; } main() {}", | 218 "class A { static final const int x = 499; } main() {}", |
| 197 "class A { static const final int x = 499; } main() {}" | 219 "class A { static const final int x = 499; } main() {}" |
| 198 ] | 220 ] |
| 199 }, | 221 }, |
| 200 "CONST_AND_VAR": { | 222 "CONST_AND_VAR": { |
| 201 "id": "GRKIQE", | 223 "id": "GRKIQE", |
| 202 "subId": 7, | 224 "subId": 7, |
| 203 "category": "ParserError", | 225 "categories": [ |
| 226 "ParserError" |
| 227 ], |
| 204 "template": "Members can't be declared to be both 'const' and 'var'", | 228 "template": "Members can't be declared to be both 'const' and 'var'", |
| 205 "templateHoleOrder": null, | 229 "templateHoleOrder": null, |
| 206 "howToFix": "Try removing either the 'const' or 'var' keyword.", | 230 "howToFix": "Try removing either the 'const' or 'var' keyword.", |
| 207 "options": null, | 231 "options": null, |
| 208 "usedBy": [ | 232 "usedBy": [ |
| 209 "Platform.analyzer" | 233 "Platform.analyzer" |
| 210 ], | 234 ], |
| 211 "examples": [ | 235 "examples": [ |
| 212 "var const x = 499; main() {}", | 236 "var const x = 499; main() {}", |
| 213 "const var x = 499; main() {}", | 237 "const var x = 499; main() {}", |
| 214 "class A { var const x = 499; } main() {}", | 238 "class A { var const x = 499; } main() {}", |
| 215 "class A { const var x = 499; } main() {}" | 239 "class A { const var x = 499; } main() {}" |
| 216 ] | 240 ] |
| 217 }, | 241 }, |
| 218 "CLASS_IN_CLASS": { | 242 "CLASS_IN_CLASS": { |
| 219 "id": "DOTHQH", | 243 "id": "DOTHQH", |
| 220 "subId": 0, | 244 "subId": 0, |
| 221 "category": "ParserError", | 245 "categories": [ |
| 246 "ParserError" |
| 247 ], |
| 222 "template": "Classes can't be declared inside other classes.", | 248 "template": "Classes can't be declared inside other classes.", |
| 223 "templateHoleOrder": null, | 249 "templateHoleOrder": null, |
| 224 "howToFix": "Try moving the class to the top-level.", | 250 "howToFix": "Try moving the class to the top-level.", |
| 225 "options": null, | 251 "options": null, |
| 226 "usedBy": [ | 252 "usedBy": [ |
| 227 "Platform.analyzer" | 253 "Platform.analyzer" |
| 228 ], | 254 ], |
| 229 "examples": [ | 255 "examples": [ |
| 230 "class A { class B {} } main() { new A(); }" | 256 "class A { class B {} } main() { new A(); }" |
| 231 ] | 257 ] |
| 232 }, | 258 }, |
| 233 "CONSTRUCTOR_WITH_RETURN_TYPE": { | 259 "CONSTRUCTOR_WITH_RETURN_TYPE": { |
| 234 "id": "VOJBWY", | 260 "id": "VOJBWY", |
| 235 "subId": 0, | 261 "subId": 0, |
| 236 "category": "ParserError", | 262 "categories": [ |
| 263 "ParserError" |
| 264 ], |
| 237 "template": "Constructors can't have a return type", | 265 "template": "Constructors can't have a return type", |
| 238 "templateHoleOrder": null, | 266 "templateHoleOrder": null, |
| 239 "howToFix": "Try removing the return type.", | 267 "howToFix": "Try removing the return type.", |
| 240 "options": null, | 268 "options": null, |
| 241 "usedBy": [ | 269 "usedBy": [ |
| 242 "Platform.analyzer", | 270 "Platform.analyzer", |
| 243 "Platform.dart2js" | 271 "Platform.dart2js" |
| 244 ], | 272 ], |
| 245 "examples": [ | 273 "examples": [ |
| 246 "class A { int A() {} } main() { new A(); }" | 274 "class A { int A() {} } main() { new A(); }" |
| 247 ] | 275 ] |
| 248 }, | 276 }, |
| 249 "MISSING_EXPRESSION_IN_THROW": { | 277 "MISSING_EXPRESSION_IN_THROW": { |
| 250 "id": "FTGGMJ", | 278 "id": "FTGGMJ", |
| 251 "subId": 0, | 279 "subId": 0, |
| 252 "category": "ParserError", | 280 "categories": [ |
| 281 "ParserError" |
| 282 ], |
| 253 "template": "Missing expression after 'throw'.", | 283 "template": "Missing expression after 'throw'.", |
| 254 "templateHoleOrder": null, | 284 "templateHoleOrder": null, |
| 255 "howToFix": "Did you mean 'rethrow'?", | 285 "howToFix": "Did you mean 'rethrow'?", |
| 256 "options": null, | 286 "options": null, |
| 257 "usedBy": [ | 287 "usedBy": [ |
| 258 "Platform.analyzer", | 288 "Platform.analyzer", |
| 259 "Platform.dart2js" | 289 "Platform.dart2js" |
| 260 ], | 290 ], |
| 261 "examples": [ | 291 "examples": [ |
| 262 "main() { throw; }", | 292 "main() { throw; }", |
| 263 "main() { try { throw 0; } catch(e) { throw; } }" | 293 "main() { try { throw 0; } catch(e) { throw; } }" |
| 264 ] | 294 ] |
| 265 }, | 295 }, |
| 266 "RETHROW_OUTSIDE_CATCH": { | 296 "RETHROW_OUTSIDE_CATCH": { |
| 267 "id": "MWETLC", | 297 "id": "MWETLC", |
| 268 "subId": 0, | 298 "subId": 0, |
| 269 "category": "CompileTimeError", | 299 "categories": [ |
| 300 "CompileTimeError" |
| 301 ], |
| 270 "template": "Rethrow must be inside of catch clause", | 302 "template": "Rethrow must be inside of catch clause", |
| 271 "templateHoleOrder": null, | 303 "templateHoleOrder": null, |
| 272 "howToFix": "Try moving the expression into a catch clause, or using a 'thro
w' expression.", | 304 "howToFix": "Try moving the expression into a catch clause, or using a 'thro
w' expression.", |
| 273 "options": null, | 305 "options": null, |
| 274 "usedBy": [ | 306 "usedBy": [ |
| 275 "Platform.analyzer", | 307 "Platform.analyzer", |
| 276 "Platform.dart2js" | 308 "Platform.dart2js" |
| 277 ], | 309 ], |
| 278 "examples": [ | 310 "examples": [ |
| 279 "main() { rethrow; }" | 311 "main() { rethrow; }" |
| 280 ] | 312 ] |
| 281 }, | 313 }, |
| 282 "RETURN_IN_GENERATIVE_CONSTRUCTOR": { | 314 "RETURN_IN_GENERATIVE_CONSTRUCTOR": { |
| 283 "id": "UOTDQH", | 315 "id": "UOTDQH", |
| 284 "subId": 0, | 316 "subId": 0, |
| 285 "category": "CompileTimeError", | 317 "categories": [ |
| 318 "CompileTimeError" |
| 319 ], |
| 286 "template": "Constructors can't return values.", | 320 "template": "Constructors can't return values.", |
| 287 "templateHoleOrder": null, | 321 "templateHoleOrder": null, |
| 288 "howToFix": "Try removing the return statement or using a factory constructo
r.", | 322 "howToFix": "Try removing the return statement or using a factory constructo
r.", |
| 289 "options": null, | 323 "options": null, |
| 290 "usedBy": [ | 324 "usedBy": [ |
| 291 "Platform.analyzer", | 325 "Platform.analyzer", |
| 292 "Platform.dart2js" | 326 "Platform.dart2js" |
| 293 ], | 327 ], |
| 294 "examples": [ | 328 "examples": [ |
| 295 " class C {\n C() {\n return 1;\n }\n
}\n\n main() => new C();" | 329 " class C {\n C() {\n return 1;\n }\n
}\n\n main() => new C();" |
| 296 ] | 330 ] |
| 297 }, | 331 }, |
| 298 "RETURN_IN_GENERATOR": { | 332 "RETURN_IN_GENERATOR": { |
| 299 "id": "JRUTUQ", | 333 "id": "JRUTUQ", |
| 300 "subId": 0, | 334 "subId": 0, |
| 301 "category": "CompileTimeError", | 335 "categories": [ |
| 336 "CompileTimeError" |
| 337 ], |
| 302 "template": "Can't return a value from a generator function (using the '#{mo
difier}' modifier).", | 338 "template": "Can't return a value from a generator function (using the '#{mo
difier}' modifier).", |
| 303 "templateHoleOrder": null, | 339 "templateHoleOrder": null, |
| 304 "howToFix": "Try removing the value, replacing 'return' with 'yield' or chan
ging the method body modifier", | 340 "howToFix": "Try removing the value, replacing 'return' with 'yield' or chan
ging the method body modifier", |
| 305 "options": null, | 341 "options": null, |
| 306 "usedBy": [ | 342 "usedBy": [ |
| 307 "Platform.analyzer", | 343 "Platform.analyzer", |
| 308 "Platform.dart2js" | 344 "Platform.dart2js" |
| 309 ], | 345 ], |
| 310 "examples": [ | 346 "examples": [ |
| 311 " foo() async* { return 0; }\n main() => foo();\n ", | 347 " foo() async* { return 0; }\n main() => foo();\n ", |
| 312 " foo() sync* { return 0; }\n main() => foo();\n " | 348 " foo() sync* { return 0; }\n main() => foo();\n " |
| 313 ] | 349 ] |
| 350 }, |
| 351 "NOT_ASSIGNABLE": { |
| 352 "id": "FYQYXB", |
| 353 "subId": 0, |
| 354 "categories": [ |
| 355 "StaticTypeWarning" |
| 356 ], |
| 357 "template": "'#{fromType}' is not assignable to '#{toType}'.", |
| 358 "templateHoleOrder": null, |
| 359 "howToFix": null, |
| 360 "options": null, |
| 361 "usedBy": [ |
| 362 "Platform.dart2js" |
| 363 ], |
| 364 "examples": null |
| 365 }, |
| 366 "FORIN_NOT_ASSIGNABLE": { |
| 367 "id": "FYQYXB", |
| 368 "subId": 1, |
| 369 "categories": [ |
| 370 "Hint" |
| 371 ], |
| 372 "template": "The element type '#{currentType}' of '#{expressionType}' is not
assignable to '#{elementType}'.", |
| 373 "templateHoleOrder": null, |
| 374 "howToFix": null, |
| 375 "options": null, |
| 376 "usedBy": [ |
| 377 "Platform.dart2js" |
| 378 ], |
| 379 "examples": [ |
| 380 " main() {\n List<int> list = <int>[1, 2];\n for
(String x in list) x;\n }\n " |
| 381 ] |
| 382 }, |
| 383 "RETURN_OF_INVALID_TYPE": { |
| 384 "id": "FYQYXB", |
| 385 "subId": 2, |
| 386 "categories": [ |
| 387 "StaticTypeWarning" |
| 388 ], |
| 389 "template": "The return type '#{fromType}' is not a '#{toType}', as defined
by the method '#{method}'.", |
| 390 "templateHoleOrder": null, |
| 391 "howToFix": null, |
| 392 "options": null, |
| 393 "usedBy": [ |
| 394 "Platform.analyzer" |
| 395 ], |
| 396 "examples": [ |
| 397 "int foo() => 'foo'; main() { foo(); }" |
| 398 ] |
| 399 }, |
| 400 "ARGUMENT_TYPE_NOT_ASSIGNABLE": { |
| 401 "id": "FYQYXB", |
| 402 "subId": 3, |
| 403 "categories": [ |
| 404 "Hint", |
| 405 "StaticWarning" |
| 406 ], |
| 407 "template": "The argument type '#{fromType}' cannot be assigned to the param
eter type '#{toType}'.", |
| 408 "templateHoleOrder": null, |
| 409 "howToFix": null, |
| 410 "options": null, |
| 411 "usedBy": [ |
| 412 "Platform.analyzer" |
| 413 ], |
| 414 "examples": [ |
| 415 "foo(int x) => x; main() { foo('bar'); }" |
| 416 ] |
| 314 } | 417 } |
| 315 } | 418 } |
| OLD | NEW |