-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathcodes.g.dart
7708 lines (7001 loc) · 286 KB
/
codes.g.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// THIS FILE IS GENERATED. DO NOT EDIT.
//
// Instead modify 'pkg/analyzer/messages.yaml' and run
// 'dart run pkg/analyzer/tool/messages/generate.dart' to update.
// We allow some snake_case and SCREAMING_SNAKE_CASE identifiers in generated
// code, as they match names declared in the source configuration files.
// ignore_for_file: constant_identifier_names
// While transitioning `HintCodes` to `WarningCodes`, we refer to deprecated
// codes here.
// ignore_for_file: deprecated_member_use_from_same_package
//
// Generated comments don't quite align with flutter style.
// ignore_for_file: flutter_style_todos
import "package:analyzer/error/error.dart";
import "package:analyzer/src/dart/error/hint_codes.g.dart";
import "package:analyzer/src/error/analyzer_error_code.dart";
class CompileTimeErrorCode extends AnalyzerErrorCode {
/// No parameters.
static const CompileTimeErrorCode ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER =
CompileTimeErrorCode(
'ABSTRACT_FIELD_INITIALIZER',
"Abstract fields can't have initializers.",
correctionMessage:
"Try removing the field initializer or the 'abstract' keyword from the "
"field declaration.",
hasPublishedDocs: true,
uniqueName: 'ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER',
);
/// No parameters.
static const CompileTimeErrorCode ABSTRACT_FIELD_INITIALIZER =
CompileTimeErrorCode(
'ABSTRACT_FIELD_INITIALIZER',
"Abstract fields can't have initializers.",
correctionMessage:
"Try removing the initializer or the 'abstract' keyword.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the display name for the kind of the found abstract member
/// 1: the name of the member
static const CompileTimeErrorCode ABSTRACT_SUPER_MEMBER_REFERENCE =
CompileTimeErrorCode(
'ABSTRACT_SUPER_MEMBER_REFERENCE',
"The {0} '{1}' is always abstract in the supertype.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the ambiguous element
/// 1: the name of the first library in which the type is found
/// 2: the name of the second library in which the type is found
static const CompileTimeErrorCode AMBIGUOUS_EXPORT = CompileTimeErrorCode(
'AMBIGUOUS_EXPORT',
"The name '{0}' is defined in the libraries '{1}' and '{2}'.",
correctionMessage:
"Try removing the export of one of the libraries, or explicitly hiding "
"the name in one of the export directives.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the member
/// 1: the names of the declaring extensions
static const CompileTimeErrorCode AMBIGUOUS_EXTENSION_MEMBER_ACCESS =
CompileTimeErrorCode(
'AMBIGUOUS_EXTENSION_MEMBER_ACCESS',
"A member named '{0}' is defined in {1}, and none are more specific.",
correctionMessage:
"Try using an extension override to specify the extension you want to "
"be chosen.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the ambiguous type
/// 1: the names of the libraries that the type is found
static const CompileTimeErrorCode AMBIGUOUS_IMPORT = CompileTimeErrorCode(
'AMBIGUOUS_IMPORT',
"The name '{0}' is defined in the libraries {1}.",
correctionMessage:
"Try using 'as prefix' for one of the import directives, or hiding the "
"name from all but one of the imports.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH =
CompileTimeErrorCode(
'AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH',
"The literal can't be either a map or a set because it contains at least "
"one literal map entry or a spread operator spreading a 'Map', and at "
"least one element which is neither of these.",
correctionMessage:
"Try removing or changing some of the elements so that all of the "
"elements are consistent.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER =
CompileTimeErrorCode(
'AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER',
"This literal must be either a map or a set, but the elements don't have "
"enough information for type inference to work.",
correctionMessage:
"Try adding type arguments to the literal (one for sets, two for "
"maps).",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the actual argument type
/// 1: the name of the expected type
/// 2: additional information, if any, when problem is associated with records
static const CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE =
CompileTimeErrorCode(
'ARGUMENT_TYPE_NOT_ASSIGNABLE',
"The argument type '{0}' can't be assigned to the parameter type '{1}'. "
"{2}",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSERT_IN_REDIRECTING_CONSTRUCTOR =
CompileTimeErrorCode(
'ASSERT_IN_REDIRECTING_CONSTRUCTOR',
"A redirecting constructor can't have an 'assert' initializer.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSIGNMENT_TO_CONST = CompileTimeErrorCode(
'ASSIGNMENT_TO_CONST',
"Constant variables can't be assigned a value.",
correctionMessage:
"Try removing the assignment, or remove the modifier 'const' from the "
"variable.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the final variable
static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL = CompileTimeErrorCode(
'ASSIGNMENT_TO_FINAL',
"'{0}' can't be used as a setter because it's final.",
correctionMessage:
"Try finding a different setter, or making '{0}' non-final.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the variable
static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL_LOCAL =
CompileTimeErrorCode(
'ASSIGNMENT_TO_FINAL_LOCAL',
"The final variable '{0}' can only be set once.",
correctionMessage: "Try making '{0}' non-final.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the reference
/// 1: the name of the class
static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL_NO_SETTER =
CompileTimeErrorCode(
'ASSIGNMENT_TO_FINAL_NO_SETTER',
"There isn't a setter named '{0}' in class '{1}'.",
correctionMessage:
"Try correcting the name to reference an existing setter, or declare "
"the setter.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSIGNMENT_TO_FUNCTION =
CompileTimeErrorCode(
'ASSIGNMENT_TO_FUNCTION',
"Functions can't be assigned a value.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSIGNMENT_TO_METHOD = CompileTimeErrorCode(
'ASSIGNMENT_TO_METHOD',
"Methods can't be assigned a value.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASSIGNMENT_TO_TYPE = CompileTimeErrorCode(
'ASSIGNMENT_TO_TYPE',
"Types can't be assigned a value.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode ASYNC_FOR_IN_WRONG_CONTEXT =
CompileTimeErrorCode(
'ASYNC_FOR_IN_WRONG_CONTEXT',
"The async for-in loop can only be used in an async function.",
correctionMessage:
"Try marking the function body with either 'async' or 'async*', or "
"removing the 'await' before the for-in loop.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode
AUGMENTATION_EXTENDS_CLAUSE_ALREADY_PRESENT = CompileTimeErrorCode(
'AUGMENTATION_EXTENDS_CLAUSE_ALREADY_PRESENT',
"The augmentation has an 'extends' clause, but an augmentation target "
"already includes an 'extends' clause and it isn't allowed to be "
"repeated or changed.",
correctionMessage:
"Try removing the 'extends' clause, either here or in the augmentation "
"target.",
);
/// Parameters:
/// 0: the lexeme of the modifier.
static const CompileTimeErrorCode AUGMENTATION_MODIFIER_EXTRA =
CompileTimeErrorCode(
'AUGMENTATION_MODIFIER_EXTRA',
"The augmentation has the '{0}' modifier that the declaration doesn't "
"have.",
correctionMessage:
"Try removing the '{0}' modifier, or adding it to the declaration.",
);
/// Parameters:
/// 0: the lexeme of the modifier.
static const CompileTimeErrorCode AUGMENTATION_MODIFIER_MISSING =
CompileTimeErrorCode(
'AUGMENTATION_MODIFIER_MISSING',
"The augmentation is missing the '{0}' modifier that the declaration has.",
correctionMessage:
"Try adding the '{0}' modifier, or removing it from the declaration.",
);
/// Parameters:
/// 0: the name of the declaration kind.
/// 1: the name of the augmentation kind.
static const CompileTimeErrorCode AUGMENTATION_OF_DIFFERENT_DECLARATION_KIND =
CompileTimeErrorCode(
'AUGMENTATION_OF_DIFFERENT_DECLARATION_KIND',
"Can't augment a {0} with a {1}.",
correctionMessage:
"Try changing the augmentation to match the declaration kind.",
);
static const CompileTimeErrorCode AUGMENTATION_TYPE_PARAMETER_BOUND =
CompileTimeErrorCode(
'AUGMENTATION_TYPE_PARAMETER_BOUND',
"The augmentation type parameter must have the same bound as the "
"corresponding type parameter of the declaration.",
correctionMessage:
"Try changing the augmentation to match the declaration type "
"parameters.",
);
static const CompileTimeErrorCode AUGMENTATION_TYPE_PARAMETER_COUNT =
CompileTimeErrorCode(
'AUGMENTATION_TYPE_PARAMETER_COUNT',
"The augmentation must have the same number of type parameters as the "
"declaration.",
correctionMessage:
"Try changing the augmentation to match the declaration type "
"parameters.",
);
static const CompileTimeErrorCode AUGMENTATION_TYPE_PARAMETER_NAME =
CompileTimeErrorCode(
'AUGMENTATION_TYPE_PARAMETER_NAME',
"The augmentation type parameter must have the same name as the "
"corresponding type parameter of the declaration.",
correctionMessage:
"Try changing the augmentation to match the declaration type "
"parameters.",
);
static const CompileTimeErrorCode AUGMENTATION_WITHOUT_DECLARATION =
CompileTimeErrorCode(
'AUGMENTATION_WITHOUT_DECLARATION',
"The declaration being augmented doesn't exist.",
correctionMessage:
"Try changing the augmentation to match an existing declaration.",
);
static const CompileTimeErrorCode AUGMENTATION_WITHOUT_IMPORT =
CompileTimeErrorCode(
'AUGMENTATION_WITHOUT_IMPORT',
"The library does not import this augmentation.",
correctionMessage:
"Try updating the augmented library to import this augmentation.",
);
static const CompileTimeErrorCode AUGMENTATION_WITHOUT_LIBRARY =
CompileTimeErrorCode(
'AUGMENTATION_WITHOUT_LIBRARY',
"The URI does not resolve to a library.",
correctionMessage:
"Try updating the URI to reference the augmented library.",
);
static const CompileTimeErrorCode AUGMENTED_EXPRESSION_IS_NOT_SETTER =
CompileTimeErrorCode(
'AUGMENTED_EXPRESSION_IS_NOT_SETTER',
"The augmented declaration is not a setter, it can't be used to write a "
"value.",
correctionMessage: "Try assigning a value to a setter.",
);
static const CompileTimeErrorCode AUGMENTED_EXPRESSION_IS_SETTER =
CompileTimeErrorCode(
'AUGMENTED_EXPRESSION_IS_SETTER',
"The augmented declaration is a setter, it can't be used to read a value.",
correctionMessage: "Try assigning a value to the augmented setter.",
);
/// Parameters:
/// 0: the lexeme of the operator.
static const CompileTimeErrorCode AUGMENTED_EXPRESSION_NOT_OPERATOR =
CompileTimeErrorCode(
'AUGMENTED_EXPRESSION_NOT_OPERATOR',
"The enclosing augmentation doesn't augment the operator '{0}'.",
correctionMessage: "Try augmenting or invoking the correct operator.",
);
/// No parameters.
static const CompileTimeErrorCode AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER =
CompileTimeErrorCode(
'AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER',
"The 'await' expression can't be used in a 'late' local variable's "
"initializer.",
correctionMessage:
"Try removing the 'late' modifier, or rewriting the initializer "
"without using the 'await' expression.",
hasPublishedDocs: true,
);
/// 16.30 Await Expressions: It is a compile-time error if the function
/// immediately enclosing _a_ is not declared asynchronous. (Where _a_ is the
/// await expression.)
static const CompileTimeErrorCode AWAIT_IN_WRONG_CONTEXT =
CompileTimeErrorCode(
'AWAIT_IN_WRONG_CONTEXT',
"The await expression can only be used in an async function.",
correctionMessage:
"Try marking the function body with either 'async' or 'async*'.",
);
static const CompileTimeErrorCode AWAIT_OF_INCOMPATIBLE_TYPE =
CompileTimeErrorCode(
'AWAIT_OF_INCOMPATIBLE_TYPE',
"The 'await' expression can't be used for an expression with an extension "
"type that is not a subtype of 'Future'.",
correctionMessage:
"Try removing the `await`, or updating the extension type to implement "
"'Future'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the base class being implemented
static const CompileTimeErrorCode BASE_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY =
CompileTimeErrorCode(
'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY',
"The class '{0}' can't be implemented outside of its library because it's "
"a base class.",
hasPublishedDocs: true,
uniqueName: 'BASE_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY',
);
/// Parameters:
/// 0: the name of the base mixin being implemented
static const CompileTimeErrorCode BASE_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY =
CompileTimeErrorCode(
'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY',
"The mixin '{0}' can't be implemented outside of its library because it's "
"a base mixin.",
hasPublishedDocs: true,
uniqueName: 'BASE_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY',
);
/// Parameters:
/// 0: the name of the return type
static const CompileTimeErrorCode BODY_MIGHT_COMPLETE_NORMALLY =
CompileTimeErrorCode(
'BODY_MIGHT_COMPLETE_NORMALLY',
"The body might complete normally, causing 'null' to be returned, but the "
"return type, '{0}', is a potentially non-nullable type.",
correctionMessage:
"Try adding either a return or a throw statement at the end.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode BREAK_LABEL_ON_SWITCH_MEMBER =
CompileTimeErrorCode(
'BREAK_LABEL_ON_SWITCH_MEMBER',
"A break label resolves to the 'case' or 'default' statement.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as an extension name.",
correctionMessage: "Try choosing a different name for the extension.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_EXTENSION_TYPE_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as an extension type name.",
correctionMessage: "Try choosing a different name for the extension type.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_EXTENSION_TYPE_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_PREFIX_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a prefix name.",
correctionMessage: "Try choosing a different name for the prefix.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_PREFIX_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_AS_TYPE',
"The built-in identifier '{0}' can't be used as a type.",
correctionMessage: "Try correcting the name to match an existing type.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a typedef name.",
correctionMessage: "Try choosing a different name for the typedef.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a type name.",
correctionMessage: "Try choosing a different name for the type.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_NAME',
);
/// Parameters:
/// 0: the built-in identifier that is being used
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
CompileTimeErrorCode(
'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a type parameter name.",
correctionMessage: "Try choosing a different name for the type parameter.",
hasPublishedDocs: true,
uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME',
);
/// Parameters:
/// 0: the this of the switch case expression
static const CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS =
CompileTimeErrorCode(
'CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
"The switch case expression type '{0}' can't override the '==' operator.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the type of the case expression
/// 1: the type of the switch expression
static const CompileTimeErrorCode
CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE =
CompileTimeErrorCode(
'CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE',
"The switch case expression type '{0}' must be a subtype of the switch "
"expression type '{1}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the type
static const CompileTimeErrorCode CAST_TO_NON_TYPE = CompileTimeErrorCode(
'CAST_TO_NON_TYPE',
"The name '{0}' isn't a type, so it can't be used in an 'as' expression.",
correctionMessage:
"Try changing the name to the name of an existing type, or creating a "
"type with the name '{0}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the member
static const CompileTimeErrorCode
CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER = CompileTimeErrorCode(
'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
"The instance member '{0}' can't be accessed on a class instantiation.",
correctionMessage:
"Try changing the member name to the name of a constructor.",
uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER',
);
/// Parameters:
/// 0: the name of the member
static const CompileTimeErrorCode
CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER = CompileTimeErrorCode(
'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
"The static member '{0}' can't be accessed on a class instantiation.",
correctionMessage:
"Try removing the type arguments from the class name, or changing the "
"member name to the name of a constructor.",
uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER',
);
/// Parameters:
/// 0: the name of the class
/// 1: the name of the member
static const CompileTimeErrorCode
CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER = CompileTimeErrorCode(
'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
"The class '{0}' doesn't have a constructor named '{1}'.",
correctionMessage:
"Try invoking a different constructor, or defining a constructor named "
"'{1}'.",
uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER',
);
/// Parameters:
/// 0: the name of the class being used as a mixin
static const CompileTimeErrorCode CLASS_USED_AS_MIXIN = CompileTimeErrorCode(
'CLASS_USED_AS_MIXIN',
"The class '{0}' can't be used as a mixin because it's neither a mixin "
"class nor a mixin.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode CONCRETE_CLASS_HAS_ENUM_SUPERINTERFACE =
CompileTimeErrorCode(
'CONCRETE_CLASS_HAS_ENUM_SUPERINTERFACE',
"Concrete classes can't have 'Enum' as a superinterface.",
correctionMessage:
"Try specifying a different interface, or remove it from the list.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the abstract method
/// 1: the name of the enclosing class
static const CompileTimeErrorCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER =
CompileTimeErrorCode(
'CONCRETE_CLASS_WITH_ABSTRACT_MEMBER',
"'{0}' must have a method body because '{1}' isn't abstract.",
correctionMessage: "Try making '{1}' abstract, or adding a body to '{0}'.",
hasPublishedDocs: true,
);
/// Parameters:
/// 0: the name of the constructor and field
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD =
CompileTimeErrorCode(
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
"'{0}' can't be used to name both a constructor and a static field in this "
"class.",
correctionMessage: "Try renaming either the constructor or the field.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD',
);
/// Parameters:
/// 0: the name of the constructor and getter
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER =
CompileTimeErrorCode(
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
"'{0}' can't be used to name both a constructor and a static getter in "
"this class.",
correctionMessage: "Try renaming either the constructor or the getter.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER',
);
/// Parameters:
/// 0: the name of the constructor
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD =
CompileTimeErrorCode(
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
"'{0}' can't be used to name both a constructor and a static method in "
"this class.",
correctionMessage: "Try renaming either the constructor or the method.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD',
);
/// Parameters:
/// 0: the name of the constructor and setter
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER =
CompileTimeErrorCode(
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
"'{0}' can't be used to name both a constructor and a static setter in "
"this class.",
correctionMessage: "Try renaming either the constructor or the setter.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER',
);
/// 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
/// error if `C` declares a getter or a setter with basename `n`, and has a
/// method named `n`.
///
/// Parameters:
/// 0: the name of the class defining the conflicting field
/// 1: the name of the conflicting field
/// 2: the name of the class defining the method with which the field conflicts
static const CompileTimeErrorCode CONFLICTING_FIELD_AND_METHOD =
CompileTimeErrorCode(
'CONFLICTING_FIELD_AND_METHOD',
"Class '{0}' can't define field '{1}' and have method '{2}.{1}' with the "
"same name.",
correctionMessage:
"Try converting the getter to a method, or renaming the field to a "
"name that doesn't conflict.",
);
/// Parameters:
/// 0: the name of the kind of the element implementing the conflicting interface
/// 1: the name of the element implementing the conflicting interface
/// 2: the first conflicting type
/// 3: the second conflicting type
static const CompileTimeErrorCode CONFLICTING_GENERIC_INTERFACES =
CompileTimeErrorCode(
'CONFLICTING_GENERIC_INTERFACES',
"The {0} '{1}' can't implement both '{2}' and '{3}' because the type "
"arguments are different.",
hasPublishedDocs: true,
);
/// 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
/// error if the interface of `C` has an instance method named `n` and an
/// instance setter with basename `n`.
///
/// Parameters:
/// 0: the name of the enclosing element kind - class, extension type, etc
/// 1: the name of the enclosing element
/// 2: the name of the conflicting method / setter
static const CompileTimeErrorCode CONFLICTING_INHERITED_METHOD_AND_SETTER =
CompileTimeErrorCode(
'CONFLICTING_INHERITED_METHOD_AND_SETTER',
"The {0} '{1}' can't inherit both a method and a setter named '{2}'.",
);
/// 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
/// error if `C` declares a method named `n`, and has a getter or a setter
/// with basename `n`.
///
/// Parameters:
/// 0: the name of the class defining the conflicting method
/// 1: the name of the conflicting method
/// 2: the name of the class defining the field with which the method conflicts
static const CompileTimeErrorCode CONFLICTING_METHOD_AND_FIELD =
CompileTimeErrorCode(
'CONFLICTING_METHOD_AND_FIELD',
"Class '{0}' can't define method '{1}' and have field '{2}.{1}' with the "
"same name.",
correctionMessage:
"Try converting the method to a getter, or renaming the method to a "
"name that doesn't conflict.",
);
/// 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
/// error if `C` declares a static member with basename `n`, and has an
/// instance member with basename `n`.
///
/// Parameters:
/// 0: the name of the class defining the conflicting member
/// 1: the name of the conflicting static member
/// 2: the name of the class defining the field with which the method conflicts
static const CompileTimeErrorCode CONFLICTING_STATIC_AND_INSTANCE =
CompileTimeErrorCode(
'CONFLICTING_STATIC_AND_INSTANCE',
"Class '{0}' can't define static member '{1}' and have instance member "
"'{2}.{1}' with the same name.",
correctionMessage:
"Try renaming the member to a name that doesn't conflict.",
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the class in which "
"the type variable is defined.",
correctionMessage: "Try renaming either the type variable or the class.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_CLASS',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_ENUM =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the enum in which "
"the type variable is defined.",
correctionMessage: "Try renaming either the type variable or the enum.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_ENUM',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_EXTENSION =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the extension in "
"which the type variable is defined.",
correctionMessage:
"Try renaming either the type variable or the extension.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_EXTENSION',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode
CONFLICTING_TYPE_VARIABLE_AND_EXTENSION_TYPE = CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the extension type "
"in which the type variable is defined.",
correctionMessage:
"Try renaming either the type variable or the extension.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_EXTENSION_TYPE',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"class.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_ENUM =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"enum.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_ENUM',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode
CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION = CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"extension.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode
CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION_TYPE =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"extension type.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION_TYPE',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
"'{0}' can't be used to name both a type variable and a member in this "
"mixin.",
correctionMessage: "Try renaming either the type variable or the member.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN',
);
/// Parameters:
/// 0: the name of the type variable
static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MIXIN =
CompileTimeErrorCode(
'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
"'{0}' can't be used to name both a type variable and the mixin in which "
"the type variable is defined.",
correctionMessage: "Try renaming either the type variable or the mixin.",
hasPublishedDocs: true,
uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MIXIN',
);
/// No parameters.
static const CompileTimeErrorCode
CONSTANT_PATTERN_WITH_NON_CONSTANT_EXPRESSION = CompileTimeErrorCode(
'CONSTANT_PATTERN_WITH_NON_CONSTANT_EXPRESSION',
"The expression of a constant pattern must be a valid constant.",
correctionMessage: "Try making the expression a valid constant.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode
CONST_CONSTRUCTOR_CONSTANT_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
"Constant values from a deferred library can't be used as values in a "
"'const' constructor.",
correctionMessage:
"Try removing the keyword 'const' from the constructor or removing the "
"keyword 'deferred' from the import.",
hasPublishedDocs: true,
uniqueName: 'CONST_CONSTRUCTOR_CONSTANT_FROM_DEFERRED_LIBRARY',
);
/// 16.12.2 Const: It is a compile-time error if evaluation of a constant
/// object results in an uncaught exception being thrown.
///
/// Parameters:
/// 0: the type of the runtime value of the argument
/// 1: the name of the field
/// 2: the type of the field
static const CompileTimeErrorCode CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH',
"In a const constructor, a value of type '{0}' can't be assigned to the "
"field '{1}', which has type '{2}'.",
correctionMessage: "Try using a subtype, or removing the keyword 'const'.",
);
/// Parameters:
/// 0: the type of the runtime value of the argument
/// 1: the static type of the parameter
static const CompileTimeErrorCode CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH',
"A value of type '{0}' can't be assigned to a parameter of type '{1}' in a "
"const constructor.",
correctionMessage: "Try using a subtype, or removing the keyword 'const'.",
hasPublishedDocs: true,
);
/// 16.12.2 Const: It is a compile-time error if evaluation of a constant
/// object results in an uncaught exception being thrown.
static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_THROWS_EXCEPTION',
"Const constructors can't throw exceptions.",
correctionMessage:
"Try removing the throw statement, or removing the keyword 'const'.",
);
/// Parameters:
/// 0: the name of the field
static const CompileTimeErrorCode
CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST',
"Can't define the 'const' constructor because the field '{0}' is "
"initialized with a non-constant value.",
correctionMessage:
"Try initializing the field to a constant value, or removing the "
"keyword 'const' from the constructor.",
hasPublishedDocs: true,
);
/// 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
/// or implicitly, in the initializer list of a constant constructor must
/// specify a constant constructor of the superclass of the immediately
/// enclosing class or a compile-time error occurs.
///
/// 12.1 Mixin Application: For each generative constructor named ... an
/// implicitly declared constructor named ... is declared. If Sq is a
/// generative const constructor, and M does not declare any fields, Cq is
/// also a const constructor.
///
/// Parameters:
/// 0: the name of the instance field.
static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
"This constructor can't be declared 'const' because a mixin adds the "
"instance field: {0}.",
correctionMessage:
"Try removing the 'const' keyword or removing the 'with' clause from "
"the class declaration, or removing the field from the mixin class.",
);
/// 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
/// or implicitly, in the initializer list of a constant constructor must
/// specify a constant constructor of the superclass of the immediately
/// enclosing class or a compile-time error occurs.
///
/// 12.1 Mixin Application: For each generative constructor named ... an
/// implicitly declared constructor named ... is declared. If Sq is a
/// generative const constructor, and M does not declare any fields, Cq is
/// also a const constructor.
///
/// Parameters:
/// 0: the names of the instance fields.
static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
"This constructor can't be declared 'const' because the mixins add the "
"instance fields: {0}.",
correctionMessage:
"Try removing the 'const' keyword or removing the 'with' clause from "
"the class declaration, or removing the fields from the mixin classes.",
uniqueName: 'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS',
);
/// Parameters:
/// 0: the name of the superclass
static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER',
"A constant constructor can't call a non-constant super constructor of "
"'{0}'.",
correctionMessage:
"Try calling a constant constructor in the superclass, or removing the "
"keyword 'const' from the constructor.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD =
CompileTimeErrorCode(
'CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD',
"Can't define a const constructor for a class with non-final fields.",
correctionMessage:
"Try making all of the fields final, or removing the keyword 'const' "
"from the constructor.",
hasPublishedDocs: true,
);
/// No parameters.
static const CompileTimeErrorCode CONST_DEFERRED_CLASS = CompileTimeErrorCode(
'CONST_DEFERRED_CLASS',
"Deferred classes can't be created with 'const'.",
correctionMessage:
"Try using 'new' to create the instance, or changing the import to not "
"be deferred.",
hasPublishedDocs: true,
);
static const CompileTimeErrorCode CONST_EVAL_ASSERTION_FAILURE =
CompileTimeErrorCode(
'CONST_EVAL_ASSERTION_FAILURE',
"The assertion in this constant expression failed.",
);
/// Parameters:
/// 0: the message of the assertion
static const CompileTimeErrorCode CONST_EVAL_ASSERTION_FAILURE_WITH_MESSAGE =
CompileTimeErrorCode(
'CONST_EVAL_ASSERTION_FAILURE_WITH_MESSAGE',