OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library analyzer.src.generated.error; | 5 library analyzer.src.generated.error; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
| 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/dart/element/type.dart'; |
9 import 'package:analyzer/source/error_processor.dart'; | 11 import 'package:analyzer/source/error_processor.dart'; |
10 import 'package:analyzer/src/generated/ast.dart' show AstNode; | 12 import 'package:analyzer/src/generated/ast.dart' show AstNode; |
11 import 'package:analyzer/src/generated/element.dart'; | |
12 import 'package:analyzer/src/generated/java_core.dart'; | 13 import 'package:analyzer/src/generated/java_core.dart'; |
13 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; | 14 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; |
14 import 'package:analyzer/src/generated/scanner.dart' | 15 import 'package:analyzer/src/generated/scanner.dart' |
15 show ScannerErrorCode, Token; | 16 show ScannerErrorCode, Token; |
16 import 'package:analyzer/src/generated/source.dart'; | 17 import 'package:analyzer/src/generated/source.dart'; |
17 import 'package:analyzer/src/task/model.dart'; | 18 import 'package:analyzer/src/task/model.dart'; |
18 import 'package:analyzer/task/model.dart'; | 19 import 'package:analyzer/task/model.dart'; |
19 import 'package:source_span/source_span.dart'; | 20 import 'package:source_span/source_span.dart'; |
20 | 21 |
21 /** | 22 /** |
(...skipping 11 matching lines...) Expand all Loading... |
33 class AnalysisError { | 34 class AnalysisError { |
34 /** | 35 /** |
35 * An empty array of errors used when no errors are expected. | 36 * An empty array of errors used when no errors are expected. |
36 */ | 37 */ |
37 static const List<AnalysisError> NO_ERRORS = const <AnalysisError>[]; | 38 static const List<AnalysisError> NO_ERRORS = const <AnalysisError>[]; |
38 | 39 |
39 /** | 40 /** |
40 * A [Comparator] that sorts by the name of the file that the [AnalysisError] | 41 * A [Comparator] that sorts by the name of the file that the [AnalysisError] |
41 * was found. | 42 * was found. |
42 */ | 43 */ |
43 static Comparator<AnalysisError> FILE_COMPARATOR = (AnalysisError o1, | 44 static Comparator<AnalysisError> FILE_COMPARATOR = |
44 AnalysisError o2) => | 45 (AnalysisError o1, AnalysisError o2) => |
45 o1.source.shortName.compareTo(o2.source.shortName); | 46 o1.source.shortName.compareTo(o2.source.shortName); |
46 | 47 |
47 /** | 48 /** |
48 * A [Comparator] that sorts error codes first by their severity (errors | 49 * A [Comparator] that sorts error codes first by their severity (errors |
49 * first, warnings second), and then by the the error code type. | 50 * first, warnings second), and then by the the error code type. |
50 */ | 51 */ |
51 static Comparator<AnalysisError> ERROR_CODE_COMPARATOR = | 52 static Comparator<AnalysisError> ERROR_CODE_COMPARATOR = |
52 (AnalysisError o1, AnalysisError o2) { | 53 (AnalysisError o1, AnalysisError o2) { |
53 ErrorCode errorCode1 = o1.errorCode; | 54 ErrorCode errorCode1 = o1.errorCode; |
54 ErrorCode errorCode2 = o2.errorCode; | 55 ErrorCode errorCode2 = o2.errorCode; |
55 ErrorSeverity errorSeverity1 = errorCode1.errorSeverity; | 56 ErrorSeverity errorSeverity1 = errorCode1.errorSeverity; |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 // clear to the user that the error is coming from constant evaluation (and | 399 // clear to the user that the error is coming from constant evaluation (and |
399 // hence the constant needs to be a subtype of the annotated type) as opposed | 400 // hence the constant needs to be a subtype of the annotated type) as opposed |
400 // to static type analysis (which only requires that the two types be | 401 // to static type analysis (which only requires that the two types be |
401 // assignable). Also consider populating the "correction" field for these | 402 // assignable). Also consider populating the "correction" field for these |
402 // errors. | 403 // errors. |
403 | 404 |
404 /** | 405 /** |
405 * 12.11.2 Const: It is a compile-time error if evaluation of a constant | 406 * 12.11.2 Const: It is a compile-time error if evaluation of a constant |
406 * object results in an uncaught exception being thrown. | 407 * object results in an uncaught exception being thrown. |
407 */ | 408 */ |
408 static const CheckedModeCompileTimeErrorCode CONST_CONSTRUCTOR_FIELD_TYPE_MISM
ATCH = | 409 static const CheckedModeCompileTimeErrorCode |
| 410 CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH = |
409 const CheckedModeCompileTimeErrorCode( | 411 const CheckedModeCompileTimeErrorCode( |
410 'CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH', | 412 'CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH', |
411 "The object type '{0}' cannot be assigned to the field '{1}', which ha
s type '{2}'"); | 413 "The object type '{0}' cannot be assigned to the field '{1}', which ha
s type '{2}'"); |
412 | 414 |
413 /** | 415 /** |
414 * 12.11.2 Const: It is a compile-time error if evaluation of a constant | 416 * 12.11.2 Const: It is a compile-time error if evaluation of a constant |
415 * object results in an uncaught exception being thrown. | 417 * object results in an uncaught exception being thrown. |
416 */ | 418 */ |
417 static const CheckedModeCompileTimeErrorCode CONST_CONSTRUCTOR_PARAM_TYPE_MISM
ATCH = | 419 static const CheckedModeCompileTimeErrorCode |
| 420 CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH = |
418 const CheckedModeCompileTimeErrorCode( | 421 const CheckedModeCompileTimeErrorCode( |
419 'CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH', | 422 'CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH', |
420 "The object type '{0}' cannot be assigned to a parameter of type '{1}'
"); | 423 "The object type '{0}' cannot be assigned to a parameter of type '{1}'
"); |
421 | 424 |
422 /** | 425 /** |
423 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error | 426 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error |
424 * if o is not <b>null</b> and the interface of the class of <i>o</i> is not a | 427 * if o is not <b>null</b> and the interface of the class of <i>o</i> is not a |
425 * subtype of the static type of the field <i>v</i>. | 428 * subtype of the static type of the field <i>v</i>. |
426 * | 429 * |
427 * 12.11.2 Const: It is a compile-time error if evaluation of a constant | 430 * 12.11.2 Const: It is a compile-time error if evaluation of a constant |
428 * object results in an uncaught exception being thrown. | 431 * object results in an uncaught exception being thrown. |
429 * | 432 * |
430 * Parameters: | 433 * Parameters: |
431 * 0: the name of the type of the initializer expression | 434 * 0: the name of the type of the initializer expression |
432 * 1: the name of the type of the field | 435 * 1: the name of the type of the field |
433 */ | 436 */ |
434 static const CheckedModeCompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIG
NABLE = | 437 static const CheckedModeCompileTimeErrorCode |
| 438 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = |
435 const CheckedModeCompileTimeErrorCode( | 439 const CheckedModeCompileTimeErrorCode( |
436 'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', | 440 'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', |
437 "The initializer type '{0}' cannot be assigned to the field type '{1}'
"); | 441 "The initializer type '{0}' cannot be assigned to the field type '{1}'
"); |
438 | 442 |
439 /** | 443 /** |
440 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i> | 444 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i> |
441 * ... <i>e<sub>n</sub></i>] is evaluated as follows: | 445 * ... <i>e<sub>n</sub></i>] is evaluated as follows: |
442 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and | 446 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and |
443 * second argument <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 447 * second argument <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
444 * | 448 * |
445 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static | 449 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static |
446 * type of <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of | 450 * type of <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of |
447 * <i>p<sub>i</sub>, 1 <= i <= n+k</i> and let <i>S<sub>q</sub></i> be | 451 * <i>p<sub>i</sub>, 1 <= i <= n+k</i> and let <i>S<sub>q</sub></i> be |
448 * the type of the named parameter <i>q</i> of <i>f</i>. It is a static | 452 * the type of the named parameter <i>q</i> of <i>f</i>. It is a static |
449 * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, | 453 * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, |
450 * 1 <= j <= m</i>. | 454 * 1 <= j <= m</i>. |
451 */ | 455 */ |
452 static const CheckedModeCompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
= | 456 static const CheckedModeCompileTimeErrorCode |
453 const CheckedModeCompileTimeErrorCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', | 457 LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const CheckedModeCompileTimeErrorCode( |
| 458 'LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', |
454 "The element type '{0}' cannot be assigned to the list type '{1}'"); | 459 "The element type '{0}' cannot be assigned to the list type '{1}'"); |
455 | 460 |
456 /** | 461 /** |
457 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> | 462 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> |
458 * [<i>k<sub>1</sub></i> : <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : | 463 * [<i>k<sub>1</sub></i> : <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : |
459 * <i>e<sub>n</sub></i>] is evaluated as follows: | 464 * <i>e<sub>n</sub></i>] is evaluated as follows: |
460 * * The operator []= is invoked on <i>m</i> with first argument | 465 * * The operator []= is invoked on <i>m</i> with first argument |
461 * <i>k<sub>i</sub></i> and second argument <i>e<sub>i</sub></i><i>, 1 <= | 466 * <i>k<sub>i</sub></i> and second argument <i>e<sub>i</sub></i><i>, 1 <= |
462 * i <= n</i> | 467 * i <= n</i> |
463 * | 468 * |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 */ | 715 */ |
711 static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = | 716 static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = |
712 const CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', | 717 const CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', |
713 "'const' constructors cannot throw exceptions"); | 718 "'const' constructors cannot throw exceptions"); |
714 | 719 |
715 /** | 720 /** |
716 * 10.6.3 Constant Constructors: It is a compile-time error if a constant | 721 * 10.6.3 Constant Constructors: It is a compile-time error if a constant |
717 * constructor is declared by a class C if any instance variable declared in C | 722 * constructor is declared by a class C if any instance variable declared in C |
718 * is initialized with an expression that is not a constant expression. | 723 * is initialized with an expression that is not a constant expression. |
719 */ | 724 */ |
720 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_
NON_CONST = | 725 static const CompileTimeErrorCode |
| 726 CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST = |
721 const CompileTimeErrorCode( | 727 const CompileTimeErrorCode( |
722 'CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST', | 728 'CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST', |
723 "Can't define the 'const' constructor because the field '{0}' is initi
alized with a non-constant value"); | 729 "Can't define the 'const' constructor because the field '{0}' is initi
alized with a non-constant value"); |
724 | 730 |
725 /** | 731 /** |
726 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly | 732 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly |
727 * or implicitly, in the initializer list of a constant constructor must | 733 * or implicitly, in the initializer list of a constant constructor must |
728 * specify a constant constructor of the superclass of the immediately | 734 * specify a constant constructor of the superclass of the immediately |
729 * enclosing class or a compile-time error occurs. | 735 * enclosing class or a compile-time error occurs. |
730 * | 736 * |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 const CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', | 784 const CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', |
779 "'const' variables must be constant value"); | 785 "'const' variables must be constant value"); |
780 | 786 |
781 /** | 787 /** |
782 * 5 Variables: A constant variable must be initialized to a compile-time | 788 * 5 Variables: A constant variable must be initialized to a compile-time |
783 * constant or a compile-time error occurs. | 789 * constant or a compile-time error occurs. |
784 * | 790 * |
785 * 12.1 Constants: A qualified reference to a static constant variable that is | 791 * 12.1 Constants: A qualified reference to a static constant variable that is |
786 * not qualified by a deferred prefix. | 792 * not qualified by a deferred prefix. |
787 */ | 793 */ |
788 static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FR
OM_DEFERRED_LIBRARY = | 794 static const CompileTimeErrorCode |
| 795 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY = |
789 const CompileTimeErrorCode( | 796 const CompileTimeErrorCode( |
790 'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY', | 797 'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY', |
791 "Constant values from a deferred library cannot be used to initialized
a 'const' variable"); | 798 "Constant values from a deferred library cannot be used to initialized
a 'const' variable"); |
792 | 799 |
793 /** | 800 /** |
794 * 7.5 Instance Variables: It is a compile-time error if an instance variable | 801 * 7.5 Instance Variables: It is a compile-time error if an instance variable |
795 * is declared to be constant. | 802 * is declared to be constant. |
796 */ | 803 */ |
797 static const CompileTimeErrorCode CONST_INSTANCE_FIELD = | 804 static const CompileTimeErrorCode CONST_INSTANCE_FIELD = |
798 const CompileTimeErrorCode('CONST_INSTANCE_FIELD', | 805 const CompileTimeErrorCode('CONST_INSTANCE_FIELD', |
799 "Only static fields can be declared as 'const'"); | 806 "Only static fields can be declared as 'const'"); |
800 | 807 |
801 /** | 808 /** |
802 * 12.8 Maps: It is a compile-time error if the key of an entry in a constant | 809 * 12.8 Maps: It is a compile-time error if the key of an entry in a constant |
803 * map literal is an instance of a class that implements the operator | 810 * map literal is an instance of a class that implements the operator |
804 * <i>==</i> unless the key is a string or integer. | 811 * <i>==</i> unless the key is a string or integer. |
805 */ | 812 */ |
806 static const CompileTimeErrorCode CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQU
ALS = | 813 static const CompileTimeErrorCode |
| 814 CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = |
807 const CompileTimeErrorCode( | 815 const CompileTimeErrorCode( |
808 'CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', | 816 'CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', |
809 "The constant map entry key expression type '{0}' cannot override the
== operator"); | 817 "The constant map entry key expression type '{0}' cannot override the
== operator"); |
810 | 818 |
811 /** | 819 /** |
812 * 5 Variables: A constant variable must be initialized to a compile-time | 820 * 5 Variables: A constant variable must be initialized to a compile-time |
813 * constant (12.1) or a compile-time error occurs. | 821 * constant (12.1) or a compile-time error occurs. |
814 * | 822 * |
815 * Parameters: | 823 * Parameters: |
816 * 0: the name of the uninitialized final variable | 824 * 0: the name of the uninitialized final variable |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 * function type. | 980 * function type. |
973 */ | 981 */ |
974 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER = | 982 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER = |
975 const CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', | 983 const CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', |
976 "Default values aren't allowed in function type parameters"); | 984 "Default values aren't allowed in function type parameters"); |
977 | 985 |
978 /** | 986 /** |
979 * 7.6.2 Factories: It is a compile-time error if <i>k</i> explicitly | 987 * 7.6.2 Factories: It is a compile-time error if <i>k</i> explicitly |
980 * specifies a default value for an optional parameter. | 988 * specifies a default value for an optional parameter. |
981 */ | 989 */ |
982 static const CompileTimeErrorCode DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRU
CTOR = | 990 static const CompileTimeErrorCode |
| 991 DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR = |
983 const CompileTimeErrorCode( | 992 const CompileTimeErrorCode( |
984 'DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR', | 993 'DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR', |
985 "Default values aren't allowed in factory constructors that redirect t
o another constructor"); | 994 "Default values aren't allowed in factory constructors that redirect t
o another constructor"); |
986 | 995 |
987 /** | 996 /** |
988 * 3.1 Scoping: It is a compile-time error if there is more than one entity | 997 * 3.1 Scoping: It is a compile-time error if there is more than one entity |
989 * with the same name declared in the same scope. | 998 * with the same name declared in the same scope. |
990 */ | 999 */ |
991 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = | 1000 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = |
992 const CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', | 1001 const CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = | 1169 static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = |
1161 const CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', | 1170 const CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', |
1162 "The field '{0}' cannot be initialized twice in the same constructor")
; | 1171 "The field '{0}' cannot be initialized twice in the same constructor")
; |
1163 | 1172 |
1164 /** | 1173 /** |
1165 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It | 1174 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It |
1166 * is a compile time error if <i>k</i>'s initializer list contains an | 1175 * is a compile time error if <i>k</i>'s initializer list contains an |
1167 * initializer for a variable that is initialized by means of an initializing | 1176 * initializer for a variable that is initialized by means of an initializing |
1168 * formal of <i>k</i>. | 1177 * formal of <i>k</i>. |
1169 */ | 1178 */ |
1170 static const CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = | 1179 static const CompileTimeErrorCode |
| 1180 FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = |
1171 const CompileTimeErrorCode( | 1181 const CompileTimeErrorCode( |
1172 'FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', | 1182 'FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', |
1173 "Fields cannot be initialized in both the parameter list and the initi
alizers"); | 1183 "Fields cannot be initialized in both the parameter list and the initi
alizers"); |
1174 | 1184 |
1175 /** | 1185 /** |
1176 * 5 Variables: It is a compile-time error if a final instance variable that | 1186 * 5 Variables: It is a compile-time error if a final instance variable that |
1177 * has is initialized by means of an initializing formal of a constructor is | 1187 * has is initialized by means of an initializing formal of a constructor is |
1178 * also initialized elsewhere in the same constructor. | 1188 * also initialized elsewhere in the same constructor. |
1179 * | 1189 * |
1180 * Parameters: | 1190 * Parameters: |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1770 * denote a class available in the immediately enclosing scope. | 1780 * denote a class available in the immediately enclosing scope. |
1771 */ | 1781 */ |
1772 static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = | 1782 static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = |
1773 const CompileTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', | 1783 const CompileTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', |
1774 "Mixin can only be applied to class"); | 1784 "Mixin can only be applied to class"); |
1775 | 1785 |
1776 /** | 1786 /** |
1777 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, | 1787 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, |
1778 * in which case its only action is to invoke another generative constructor. | 1788 * in which case its only action is to invoke another generative constructor. |
1779 */ | 1789 */ |
1780 static const CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= | 1790 static const CompileTimeErrorCode |
1781 const CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', | 1791 MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = const CompileTimeErrorCode( |
| 1792 'MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', |
1782 "Constructor may have at most one 'this' redirection"); | 1793 "Constructor may have at most one 'this' redirection"); |
1783 | 1794 |
1784 /** | 1795 /** |
1785 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. | 1796 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. |
1786 * Then <i>k</i> may include at most one superinitializer in its initializer | 1797 * Then <i>k</i> may include at most one superinitializer in its initializer |
1787 * list or a compile time error occurs. | 1798 * list or a compile time error occurs. |
1788 */ | 1799 */ |
1789 static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = | 1800 static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = |
1790 const CompileTimeErrorCode('MULTIPLE_SUPER_INITIALIZERS', | 1801 const CompileTimeErrorCode('MULTIPLE_SUPER_INITIALIZERS', |
1791 "Constructor may have at most one 'super' initializer"); | 1802 "Constructor may have at most one 'super' initializer"); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 * e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</sub>}</i> or the form | 1869 * e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</sub>}</i> or the form |
1859 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case | 1870 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case |
1860 * e<sub>1</sub>: s<sub>1</sub> … label<sub>n1</sub> … | 1871 * e<sub>1</sub>: s<sub>1</sub> … label<sub>n1</sub> … |
1861 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub>}</i>, it is a | 1872 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub>}</i>, it is a |
1862 * compile-time error if the expressions <i>e<sub>k</sub></i> are not | 1873 * compile-time error if the expressions <i>e<sub>k</sub></i> are not |
1863 * compile-time constants, for all <i>1 <= k <= n</i>. | 1874 * compile-time constants, for all <i>1 <= k <= n</i>. |
1864 * | 1875 * |
1865 * 12.1 Constants: A qualified reference to a static constant variable that is | 1876 * 12.1 Constants: A qualified reference to a static constant variable that is |
1866 * not qualified by a deferred prefix. | 1877 * not qualified by a deferred prefix. |
1867 */ | 1878 */ |
1868 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_L
IBRARY = | 1879 static const CompileTimeErrorCode |
| 1880 NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY = |
1869 const CompileTimeErrorCode( | 1881 const CompileTimeErrorCode( |
1870 'NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY', | 1882 'NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY', |
1871 "Constant values from a deferred library cannot be used as a case expr
ession"); | 1883 "Constant values from a deferred library cannot be used as a case expr
ession"); |
1872 | 1884 |
1873 /** | 1885 /** |
1874 * 6.2.2 Optional Formals: It is a compile-time error if the default value of | 1886 * 6.2.2 Optional Formals: It is a compile-time error if the default value of |
1875 * an optional parameter is not a compile-time constant. | 1887 * an optional parameter is not a compile-time constant. |
1876 */ | 1888 */ |
1877 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = | 1889 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = |
1878 const CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE', | 1890 const CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE', |
1879 "Default values of an optional parameter must be constant"); | 1891 "Default values of an optional parameter must be constant"); |
1880 | 1892 |
1881 /** | 1893 /** |
1882 * 6.2.2 Optional Formals: It is a compile-time error if the default value of | 1894 * 6.2.2 Optional Formals: It is a compile-time error if the default value of |
1883 * an optional parameter is not a compile-time constant. | 1895 * an optional parameter is not a compile-time constant. |
1884 * | 1896 * |
1885 * 12.1 Constants: A qualified reference to a static constant variable that is | 1897 * 12.1 Constants: A qualified reference to a static constant variable that is |
1886 * not qualified by a deferred prefix. | 1898 * not qualified by a deferred prefix. |
1887 */ | 1899 */ |
1888 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIB
RARY = | 1900 static const CompileTimeErrorCode |
| 1901 NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY = |
1889 const CompileTimeErrorCode( | 1902 const CompileTimeErrorCode( |
1890 'NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY', | 1903 'NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY', |
1891 "Constant values from a deferred library cannot be used as a default p
arameter value"); | 1904 "Constant values from a deferred library cannot be used as a default p
arameter value"); |
1892 | 1905 |
1893 /** | 1906 /** |
1894 * 12.6 Lists: It is a compile time error if an element of a constant list | 1907 * 12.6 Lists: It is a compile time error if an element of a constant list |
1895 * literal is not a compile-time constant. | 1908 * literal is not a compile-time constant. |
1896 */ | 1909 */ |
1897 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = | 1910 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = |
1898 const CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT', | 1911 const CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT', |
1899 "'const' lists must have all constant values"); | 1912 "'const' lists must have all constant values"); |
1900 | 1913 |
1901 /** | 1914 /** |
1902 * 12.6 Lists: It is a compile time error if an element of a constant list | 1915 * 12.6 Lists: It is a compile time error if an element of a constant list |
1903 * literal is not a compile-time constant. | 1916 * literal is not a compile-time constant. |
1904 * | 1917 * |
1905 * 12.1 Constants: A qualified reference to a static constant variable that is | 1918 * 12.1 Constants: A qualified reference to a static constant variable that is |
1906 * not qualified by a deferred prefix. | 1919 * not qualified by a deferred prefix. |
1907 */ | 1920 */ |
1908 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBR
ARY = | 1921 static const CompileTimeErrorCode |
| 1922 NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY = |
1909 const CompileTimeErrorCode( | 1923 const CompileTimeErrorCode( |
1910 'NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY', | 1924 'NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY', |
1911 "Constant values from a deferred library cannot be used as values in a
'const' list"); | 1925 "Constant values from a deferred library cannot be used as values in a
'const' list"); |
1912 | 1926 |
1913 /** | 1927 /** |
1914 * 12.7 Maps: It is a compile time error if either a key or a value of an | 1928 * 12.7 Maps: It is a compile time error if either a key or a value of an |
1915 * entry in a constant map literal is not a compile-time constant. | 1929 * entry in a constant map literal is not a compile-time constant. |
1916 */ | 1930 */ |
1917 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = | 1931 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = |
1918 const CompileTimeErrorCode( | 1932 const CompileTimeErrorCode( |
(...skipping 18 matching lines...) Expand all Loading... |
1937 const CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE', | 1951 const CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE', |
1938 "The values in a 'const' map must be constant"); | 1952 "The values in a 'const' map must be constant"); |
1939 | 1953 |
1940 /** | 1954 /** |
1941 * 12.7 Maps: It is a compile time error if either a key or a value of an | 1955 * 12.7 Maps: It is a compile time error if either a key or a value of an |
1942 * entry in a constant map literal is not a compile-time constant. | 1956 * entry in a constant map literal is not a compile-time constant. |
1943 * | 1957 * |
1944 * 12.1 Constants: A qualified reference to a static constant variable that is | 1958 * 12.1 Constants: A qualified reference to a static constant variable that is |
1945 * not qualified by a deferred prefix. | 1959 * not qualified by a deferred prefix. |
1946 */ | 1960 */ |
1947 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
= | 1961 static const CompileTimeErrorCode |
1948 const CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY', | 1962 NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode( |
| 1963 'NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY', |
1949 "Constant values from a deferred library cannot be used as values in a
'const' map"); | 1964 "Constant values from a deferred library cannot be used as values in a
'const' map"); |
1950 | 1965 |
1951 /** | 1966 /** |
1952 * 11 Metadata: Metadata consists of a series of annotations, each of which | 1967 * 11 Metadata: Metadata consists of a series of annotations, each of which |
1953 * begin with the character @, followed by a constant expression that must be | 1968 * begin with the character @, followed by a constant expression that must be |
1954 * either a reference to a compile-time constant variable, or a call to a | 1969 * either a reference to a compile-time constant variable, or a call to a |
1955 * constant constructor. | 1970 * constant constructor. |
1956 * | 1971 * |
1957 * "From deferred library" case is covered by | 1972 * "From deferred library" case is covered by |
1958 * [CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY]. | 1973 * [CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY]. |
(...skipping 12 matching lines...) Expand all Loading... |
1971 "Initializer expressions in constant constructors must be constants"); | 1986 "Initializer expressions in constant constructors must be constants"); |
1972 | 1987 |
1973 /** | 1988 /** |
1974 * 7.6.3 Constant Constructors: Any expression that appears within the | 1989 * 7.6.3 Constant Constructors: Any expression that appears within the |
1975 * initializer list of a constant constructor must be a potentially constant | 1990 * initializer list of a constant constructor must be a potentially constant |
1976 * expression, or a compile-time error occurs. | 1991 * expression, or a compile-time error occurs. |
1977 * | 1992 * |
1978 * 12.1 Constants: A qualified reference to a static constant variable that is | 1993 * 12.1 Constants: A qualified reference to a static constant variable that is |
1979 * not qualified by a deferred prefix. | 1994 * not qualified by a deferred prefix. |
1980 */ | 1995 */ |
1981 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFER
RED_LIBRARY = | 1996 static const CompileTimeErrorCode |
| 1997 NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY = |
1982 const CompileTimeErrorCode( | 1998 const CompileTimeErrorCode( |
1983 'NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY', | 1999 'NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY', |
1984 "Constant values from a deferred library cannot be used as constant in
itializers"); | 2000 "Constant values from a deferred library cannot be used as constant in
itializers"); |
1985 | 2001 |
1986 /** | 2002 /** |
1987 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> | 2003 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> |
1988 * or if <i>m > n</i>. | 2004 * or if <i>m > n</i>. |
1989 * | 2005 * |
1990 * 12.11.2 Const: It is a compile-time error if evaluation of a constant | 2006 * 12.11.2 Const: It is a compile-time error if evaluation of a constant |
1991 * object results in an uncaught exception being thrown. | 2007 * object results in an uncaught exception being thrown. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2114 * | 2130 * |
2115 * 8.1 Superinterfaces: It is a compile-time error if an interface is a | 2131 * 8.1 Superinterfaces: It is a compile-time error if an interface is a |
2116 * superinterface of itself. | 2132 * superinterface of itself. |
2117 * | 2133 * |
2118 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a | 2134 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a |
2119 * superclass of itself. | 2135 * superclass of itself. |
2120 * | 2136 * |
2121 * Parameters: | 2137 * Parameters: |
2122 * 0: the name of the class that implements itself recursively | 2138 * 0: the name of the class that implements itself recursively |
2123 */ | 2139 */ |
2124 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = | 2140 static const CompileTimeErrorCode |
| 2141 RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS = |
2125 const CompileTimeErrorCode( | 2142 const CompileTimeErrorCode( |
2126 'RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS', | 2143 'RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS', |
2127 "'{0}' cannot extend itself"); | 2144 "'{0}' cannot extend itself"); |
2128 | 2145 |
2129 /** | 2146 /** |
2130 * 7.10 Superinterfaces: It is a compile-time error if the interface of a | 2147 * 7.10 Superinterfaces: It is a compile-time error if the interface of a |
2131 * class <i>C</i> is a superinterface of itself. | 2148 * class <i>C</i> is a superinterface of itself. |
2132 * | 2149 * |
2133 * 8.1 Superinterfaces: It is a compile-time error if an interface is a | 2150 * 8.1 Superinterfaces: It is a compile-time error if an interface is a |
2134 * superinterface of itself. | 2151 * superinterface of itself. |
2135 * | 2152 * |
2136 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a | 2153 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a |
2137 * superclass of itself. | 2154 * superclass of itself. |
2138 * | 2155 * |
2139 * Parameters: | 2156 * Parameters: |
2140 * 0: the name of the class that implements itself recursively | 2157 * 0: the name of the class that implements itself recursively |
2141 */ | 2158 */ |
2142 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = | 2159 static const CompileTimeErrorCode |
| 2160 RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS = |
2143 const CompileTimeErrorCode( | 2161 const CompileTimeErrorCode( |
2144 'RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS', | 2162 'RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS', |
2145 "'{0}' cannot implement itself"); | 2163 "'{0}' cannot implement itself"); |
2146 | 2164 |
2147 /** | 2165 /** |
2148 * 7.10 Superinterfaces: It is a compile-time error if the interface of a | 2166 * 7.10 Superinterfaces: It is a compile-time error if the interface of a |
2149 * class <i>C</i> is a superinterface of itself. | 2167 * class <i>C</i> is a superinterface of itself. |
2150 * | 2168 * |
2151 * 8.1 Superinterfaces: It is a compile-time error if an interface is a | 2169 * 8.1 Superinterfaces: It is a compile-time error if an interface is a |
2152 * superinterface of itself. | 2170 * superinterface of itself. |
2153 * | 2171 * |
2154 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a | 2172 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a |
2155 * superclass of itself. | 2173 * superclass of itself. |
2156 * | 2174 * |
2157 * Parameters: | 2175 * Parameters: |
2158 * 0: the name of the class that implements itself recursively | 2176 * 0: the name of the class that implements itself recursively |
2159 */ | 2177 */ |
2160 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WI
TH = | 2178 static const CompileTimeErrorCode |
| 2179 RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH = |
2161 const CompileTimeErrorCode( | 2180 const CompileTimeErrorCode( |
2162 'RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH', | 2181 'RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH', |
2163 "'{0}' cannot use itself as a mixin"); | 2182 "'{0}' cannot use itself as a mixin"); |
2164 | 2183 |
2165 /** | 2184 /** |
2166 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with | 2185 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with |
2167 * the const modifier but <i>k'</i> is not a constant constructor. | 2186 * the const modifier but <i>k'</i> is not a constant constructor. |
2168 */ | 2187 */ |
2169 static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = | 2188 static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = |
2170 const CompileTimeErrorCode('REDIRECT_TO_MISSING_CONSTRUCTOR', | 2189 const CompileTimeErrorCode('REDIRECT_TO_MISSING_CONSTRUCTOR', |
(...skipping 22 matching lines...) Expand all Loading... |
2193 */ | 2212 */ |
2194 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR = | 2213 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR = |
2195 const CompileTimeErrorCode('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', | 2214 const CompileTimeErrorCode('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', |
2196 "The constructor '{0}' could not be found in '{1}'"); | 2215 "The constructor '{0}' could not be found in '{1}'"); |
2197 | 2216 |
2198 /** | 2217 /** |
2199 * 7.6.1 Generative constructors: A generative constructor may be | 2218 * 7.6.1 Generative constructors: A generative constructor may be |
2200 * <i>redirecting</i>, in which case its only action is to invoke another | 2219 * <i>redirecting</i>, in which case its only action is to invoke another |
2201 * generative constructor. | 2220 * generative constructor. |
2202 */ | 2221 */ |
2203 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTR
UCTOR = | 2222 static const CompileTimeErrorCode |
| 2223 REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR = |
2204 const CompileTimeErrorCode( | 2224 const CompileTimeErrorCode( |
2205 'REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR', | 2225 'REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR', |
2206 "Generative constructor cannot redirect to a factory constructor"); | 2226 "Generative constructor cannot redirect to a factory constructor"); |
2207 | 2227 |
2208 /** | 2228 /** |
2209 * 5 Variables: A local variable may only be referenced at a source code | 2229 * 5 Variables: A local variable may only be referenced at a source code |
2210 * location that is after its initializer, if any, is complete, or a | 2230 * location that is after its initializer, if any, is complete, or a |
2211 * compile-time error occurs. | 2231 * compile-time error occurs. |
2212 */ | 2232 */ |
2213 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = | 2233 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2324 const CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', | 2344 const CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', |
2325 "The class '{0}' does not have a generative constructor '{1}'"); | 2345 "The class '{0}' does not have a generative constructor '{1}'"); |
2326 | 2346 |
2327 /** | 2347 /** |
2328 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the | 2348 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the |
2329 * superinitializer appears and let <i>S</i> be the superclass of <i>C</i>. | 2349 * superinitializer appears and let <i>S</i> be the superclass of <i>C</i>. |
2330 * Let <i>k</i> be a generative constructor. It is a compile-time error if | 2350 * Let <i>k</i> be a generative constructor. It is a compile-time error if |
2331 * class <i>S</i> does not declare a generative constructor named <i>S</i> | 2351 * class <i>S</i> does not declare a generative constructor named <i>S</i> |
2332 * (respectively <i>S.id</i>) | 2352 * (respectively <i>S.id</i>) |
2333 */ | 2353 */ |
2334 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= | 2354 static const CompileTimeErrorCode |
2335 const CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', | 2355 UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = const CompileTimeErrorCode( |
| 2356 'UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', |
2336 "The class '{0}' does not have a default generative constructor"); | 2357 "The class '{0}' does not have a default generative constructor"); |
2337 | 2358 |
2338 /** | 2359 /** |
2339 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, | 2360 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, |
2340 * <i>1<=i<=l</i>, must have a corresponding named parameter in the set | 2361 * <i>1<=i<=l</i>, must have a corresponding named parameter in the set |
2341 * {<i>p<sub>n+1</sub></i> ... <i>p<sub>n+k</sub></i>} or a static warning | 2362 * {<i>p<sub>n+1</sub></i> ... <i>p<sub>n+k</sub></i>} or a static warning |
2342 * occurs. | 2363 * occurs. |
2343 * | 2364 * |
2344 * 12.11.2 Const: It is a compile-time error if evaluation of a constant | 2365 * 12.11.2 Const: It is a compile-time error if evaluation of a constant |
2345 * object results in an uncaught exception being thrown. | 2366 * object results in an uncaught exception being thrown. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2403 const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', | 2424 const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', |
2404 "Operator '{0}' should declare exactly {1} parameter(s), but {2} found
"); | 2425 "Operator '{0}' should declare exactly {1} parameter(s), but {2} found
"); |
2405 | 2426 |
2406 /** | 2427 /** |
2407 * 7.1.1 Operators: It is a compile time error if the arity of the | 2428 * 7.1.1 Operators: It is a compile time error if the arity of the |
2408 * user-declared operator - is not 0 or 1. | 2429 * user-declared operator - is not 0 or 1. |
2409 * | 2430 * |
2410 * Parameters: | 2431 * Parameters: |
2411 * 0: the number of parameters found in the operator declaration | 2432 * 0: the number of parameters found in the operator declaration |
2412 */ | 2433 */ |
2413 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = | 2434 static const CompileTimeErrorCode |
| 2435 WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = |
2414 const CompileTimeErrorCode( | 2436 const CompileTimeErrorCode( |
2415 'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', | 2437 'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', |
2416 "Operator '-' should declare 0 or 1 parameter, but {0} found"); | 2438 "Operator '-' should declare 0 or 1 parameter, but {0} found"); |
2417 | 2439 |
2418 /** | 2440 /** |
2419 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list | 2441 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list |
2420 * does not include exactly one required formal parameter <i>p</i>. | 2442 * does not include exactly one required formal parameter <i>p</i>. |
2421 */ | 2443 */ |
2422 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = | 2444 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = |
2423 const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', | 2445 const CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2508 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, | 2530 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, |
2509 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER, | 2531 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER, |
2510 CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION, | 2532 CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION, |
2511 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST, | 2533 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST, |
2512 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN, | 2534 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN, |
2513 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, | 2535 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, |
2514 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, | 2536 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, |
2515 CompileTimeErrorCode.CONST_DEFERRED_CLASS, | 2537 CompileTimeErrorCode.CONST_DEFERRED_CLASS, |
2516 CompileTimeErrorCode.CONST_FORMAL_PARAMETER, | 2538 CompileTimeErrorCode.CONST_FORMAL_PARAMETER, |
2517 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, | 2539 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, |
2518 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED
_LIBRARY, | 2540 CompileTimeErrorCode |
| 2541 .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY, |
2519 CompileTimeErrorCode.CONST_INSTANCE_FIELD, | 2542 CompileTimeErrorCode.CONST_INSTANCE_FIELD, |
2520 CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | 2543 CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
2521 CompileTimeErrorCode.CONST_NOT_INITIALIZED, | 2544 CompileTimeErrorCode.CONST_NOT_INITIALIZED, |
2522 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, | 2545 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, |
2523 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING, | 2546 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING, |
2524 CompileTimeErrorCode.CONST_EVAL_TYPE_INT, | 2547 CompileTimeErrorCode.CONST_EVAL_TYPE_INT, |
2525 CompileTimeErrorCode.CONST_EVAL_TYPE_NUM, | 2548 CompileTimeErrorCode.CONST_EVAL_TYPE_NUM, |
2526 CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, | 2549 CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, |
2527 CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE, | 2550 CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE, |
2528 CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS, | 2551 CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2611 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, | 2634 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, |
2612 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY, | 2635 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY, |
2613 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, | 2636 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, |
2614 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY, | 2637 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY, |
2615 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, | 2638 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, |
2616 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY, | 2639 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY, |
2617 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, | 2640 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, |
2618 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY, | 2641 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY, |
2619 CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, | 2642 CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, |
2620 CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER, | 2643 CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER, |
2621 CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY
, | 2644 CompileTimeErrorCode |
| 2645 .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY, |
2622 CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS, | 2646 CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS, |
2623 CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, | 2647 CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, |
2624 CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, | 2648 CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, |
2625 CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR, | 2649 CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR, |
2626 CompileTimeErrorCode.PART_OF_NON_PART, | 2650 CompileTimeErrorCode.PART_OF_NON_PART, |
2627 CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, | 2651 CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, |
2628 CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT, | 2652 CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT, |
2629 CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER, | 2653 CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER, |
2630 CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, | 2654 CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, |
2631 CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT, | 2655 CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT, |
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4322 "The setter '{0}' is not defined in a superclass of '{1}'"); | 4346 "The setter '{0}' is not defined in a superclass of '{1}'"); |
4323 | 4347 |
4324 /** | 4348 /** |
4325 * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does | 4349 * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does |
4326 * not have an accessible (3.2) instance member named <i>m</i>. | 4350 * not have an accessible (3.2) instance member named <i>m</i>. |
4327 * | 4351 * |
4328 * This is a specialization of [INSTANCE_ACCESS_TO_STATIC_MEMBER] that is used | 4352 * This is a specialization of [INSTANCE_ACCESS_TO_STATIC_MEMBER] that is used |
4329 * when we are able to find the name defined in a supertype. It exists to | 4353 * when we are able to find the name defined in a supertype. It exists to |
4330 * provide a more informative error message. | 4354 * provide a more informative error message. |
4331 */ | 4355 */ |
4332 static const StaticTypeWarningCode UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_M
EMBER = | 4356 static const StaticTypeWarningCode |
| 4357 UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER = |
4333 const StaticTypeWarningCode( | 4358 const StaticTypeWarningCode( |
4334 'UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER', | 4359 'UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER', |
4335 "Static members from supertypes must be qualified by the name of the d
efining type"); | 4360 "Static members from supertypes must be qualified by the name of the d
efining type"); |
4336 | 4361 |
4337 /** | 4362 /** |
4338 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a | 4363 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a |
4339 * generic type with exactly <i>n</i> type parameters. | 4364 * generic type with exactly <i>n</i> type parameters. |
4340 * | 4365 * |
4341 * Parameters: | 4366 * Parameters: |
4342 * 0: the name of the type being referenced (<i>G</i>) | 4367 * 0: the name of the type being referenced (<i>G</i>) |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4547 "Element '{0}' from SDK library '{1}' is implicitly hidden by '{2}'"); | 4572 "Element '{0}' from SDK library '{1}' is implicitly hidden by '{2}'"); |
4548 | 4573 |
4549 /** | 4574 /** |
4550 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an | 4575 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an |
4551 * instance getter named <i>v</i> and an accessible static member named | 4576 * instance getter named <i>v</i> and an accessible static member named |
4552 * <i>v</i> or <i>v=</i> is declared in a superclass of <i>C</i>. | 4577 * <i>v</i> or <i>v=</i> is declared in a superclass of <i>C</i>. |
4553 * | 4578 * |
4554 * Parameters: | 4579 * Parameters: |
4555 * 0: the name of the super class declaring a static member | 4580 * 0: the name of the super class declaring a static member |
4556 */ | 4581 */ |
4557 static const StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB
ER = | 4582 static const StaticWarningCode |
| 4583 CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER = |
4558 const StaticWarningCode( | 4584 const StaticWarningCode( |
4559 'CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER', | 4585 'CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER', |
4560 "Superclass '{0}' declares static member with the same name"); | 4586 "Superclass '{0}' declares static member with the same name"); |
4561 | 4587 |
4562 /** | 4588 /** |
4563 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares | 4589 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares |
4564 * an instance method named <i>n</i> and has a setter named <i>n=</i>. | 4590 * an instance method named <i>n</i> and has a setter named <i>n=</i>. |
4565 */ | 4591 */ |
4566 static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER = | 4592 static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER = |
4567 const StaticWarningCode('CONFLICTING_INSTANCE_METHOD_SETTER', | 4593 const StaticWarningCode('CONFLICTING_INSTANCE_METHOD_SETTER', |
4568 "Class '{0}' declares instance method '{1}', but also has a setter wit
h the same name from '{2}'"); | 4594 "Class '{0}' declares instance method '{1}', but also has a setter wit
h the same name from '{2}'"); |
4569 | 4595 |
4570 /** | 4596 /** |
4571 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares | 4597 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares |
4572 * an instance method named <i>n</i> and has a setter named <i>n=</i>. | 4598 * an instance method named <i>n</i> and has a setter named <i>n=</i>. |
4573 */ | 4599 */ |
4574 static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER2 = | 4600 static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER2 = |
4575 const StaticWarningCode('CONFLICTING_INSTANCE_METHOD_SETTER2', | 4601 const StaticWarningCode('CONFLICTING_INSTANCE_METHOD_SETTER2', |
4576 "Class '{0}' declares the setter '{1}', but also has an instance metho
d in the same class"); | 4602 "Class '{0}' declares the setter '{1}', but also has an instance metho
d in the same class"); |
4577 | 4603 |
4578 /** | 4604 /** |
4579 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an | 4605 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an |
4580 * instance setter named <i>v=</i> and an accessible static member named | 4606 * instance setter named <i>v=</i> and an accessible static member named |
4581 * <i>v=</i> or <i>v</i> is declared in a superclass of <i>C</i>. | 4607 * <i>v=</i> or <i>v</i> is declared in a superclass of <i>C</i>. |
4582 * | 4608 * |
4583 * Parameters: | 4609 * Parameters: |
4584 * 0: the name of the super class declaring a static member | 4610 * 0: the name of the super class declaring a static member |
4585 */ | 4611 */ |
4586 static const StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB
ER = | 4612 static const StaticWarningCode |
| 4613 CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER = |
4587 const StaticWarningCode( | 4614 const StaticWarningCode( |
4588 'CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER', | 4615 'CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER', |
4589 "Superclass '{0}' declares static member with the same name"); | 4616 "Superclass '{0}' declares static member with the same name"); |
4590 | 4617 |
4591 /** | 4618 /** |
4592 * 7.2 Getters: It is a static warning if a class declares a static getter | 4619 * 7.2 Getters: It is a static warning if a class declares a static getter |
4593 * named <i>v</i> and also has a non-static setter named <i>v=</i>. | 4620 * named <i>v</i> and also has a non-static setter named <i>v=</i>. |
4594 */ | 4621 */ |
4595 static const StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = | 4622 static const StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = |
4596 const StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', | 4623 const StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4646 */ | 4673 */ |
4647 static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = | 4674 static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = |
4648 const StaticWarningCode('EXTRA_POSITIONAL_ARGUMENTS', | 4675 const StaticWarningCode('EXTRA_POSITIONAL_ARGUMENTS', |
4649 "{0} positional arguments expected, but {1} found"); | 4676 "{0} positional arguments expected, but {1} found"); |
4650 | 4677 |
4651 /** | 4678 /** |
4652 * 5. Variables: It is a static warning if a final instance variable that has | 4679 * 5. Variables: It is a static warning if a final instance variable that has |
4653 * been initialized at its point of declaration is also initialized in a | 4680 * been initialized at its point of declaration is also initialized in a |
4654 * constructor. | 4681 * constructor. |
4655 */ | 4682 */ |
4656 static const StaticWarningCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N = | 4683 static const StaticWarningCode |
| 4684 FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = |
4657 const StaticWarningCode( | 4685 const StaticWarningCode( |
4658 'FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION', | 4686 'FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION', |
4659 "Values cannot be set in the constructor if they are final, and have a
lready been set"); | 4687 "Values cannot be set in the constructor if they are final, and have a
lready been set"); |
4660 | 4688 |
4661 /** | 4689 /** |
4662 * 5. Variables: It is a static warning if a final instance variable that has | 4690 * 5. Variables: It is a static warning if a final instance variable that has |
4663 * been initialized at its point of declaration is also initialized in a | 4691 * been initialized at its point of declaration is also initialized in a |
4664 * constructor. | 4692 * constructor. |
4665 * | 4693 * |
4666 * Parameters: | 4694 * Parameters: |
4667 * 0: the name of the field in question | 4695 * 0: the name of the field in question |
4668 */ | 4696 */ |
4669 static const StaticWarningCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R = | 4697 static const StaticWarningCode |
| 4698 FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = |
4670 const StaticWarningCode( | 4699 const StaticWarningCode( |
4671 'FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR', | 4700 'FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR', |
4672 "'{0}' is final and was given a value when it was declared, so it cann
ot be set to a new value"); | 4701 "'{0}' is final and was given a value when it was declared, so it cann
ot be set to a new value"); |
4673 | 4702 |
4674 /** | 4703 /** |
4675 * 7.6.1 Generative Constructors: Execution of an initializer of the form | 4704 * 7.6.1 Generative Constructors: Execution of an initializer of the form |
4676 * <b>this</b>.<i>v</i> = <i>e</i> proceeds as follows: First, the expression | 4705 * <b>this</b>.<i>v</i> = <i>e</i> proceeds as follows: First, the expression |
4677 * <i>e</i> is evaluated to an object <i>o</i>. Then, the instance variable | 4706 * <i>e</i> is evaluated to an object <i>o</i>. Then, the instance variable |
4678 * <i>v</i> of the object denoted by this is bound to <i>o</i>. | 4707 * <i>v</i> of the object denoted by this is bound to <i>o</i>. |
4679 * | 4708 * |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4806 * 8.1.1 Inheritance and Overriding: However, if the above rules would cause | 4835 * 8.1.1 Inheritance and Overriding: However, if the above rules would cause |
4807 * multiple members <i>m<sub>1</sub>, …, m<sub>k</sub></i> with the | 4836 * multiple members <i>m<sub>1</sub>, …, m<sub>k</sub></i> with the |
4808 * same name <i>n</i> that would be inherited (because identically named | 4837 * same name <i>n</i> that would be inherited (because identically named |
4809 * members existed in several superinterfaces) then at most one member is | 4838 * members existed in several superinterfaces) then at most one member is |
4810 * inherited. | 4839 * inherited. |
4811 * | 4840 * |
4812 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i> are | 4841 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i> are |
4813 * getters none of the <i>m<sub>i</sub></i> are inherited, and a static | 4842 * getters none of the <i>m<sub>i</sub></i> are inherited, and a static |
4814 * warning is issued. | 4843 * warning is issued. |
4815 */ | 4844 */ |
4816 static const StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH
OD = | 4845 static const StaticWarningCode |
| 4846 INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD = |
4817 const StaticWarningCode( | 4847 const StaticWarningCode( |
4818 'INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', | 4848 'INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', |
4819 "'{0}' is inherited as a getter and also a method"); | 4849 "'{0}' is inherited as a getter and also a method"); |
4820 | 4850 |
4821 /** | 4851 /** |
4822 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares | 4852 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares |
4823 * an instance method named <i>n</i> and an accessible static member named | 4853 * an instance method named <i>n</i> and an accessible static member named |
4824 * <i>n</i> is declared in a superclass of <i>C</i>. | 4854 * <i>n</i> is declared in a superclass of <i>C</i>. |
4825 * | 4855 * |
4826 * Parameters: | 4856 * Parameters: |
4827 * 0: the name of the member with the name conflict | 4857 * 0: the name of the member with the name conflict |
4828 * 1: the name of the enclosing class that has the static member | 4858 * 1: the name of the enclosing class that has the static member |
4829 */ | 4859 */ |
4830 static const StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = | 4860 static const StaticWarningCode |
| 4861 INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC = |
4831 const StaticWarningCode( | 4862 const StaticWarningCode( |
4832 'INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC', | 4863 'INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC', |
4833 "'{0}' collides with a static member in the superclass '{1}'"); | 4864 "'{0}' collides with a static member in the superclass '{1}'"); |
4834 | 4865 |
4835 /** | 4866 /** |
4836 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a | 4867 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a |
4837 * getter <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of | 4868 * getter <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of |
4838 * <i>m2</i>. | 4869 * <i>m2</i>. |
4839 * | 4870 * |
4840 * Parameters: | 4871 * Parameters: |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4882 * <https://github.com/leafpetersen/dep-generic-methods/blob/master/proposal.m
d#function-subtyping> | 4913 * <https://github.com/leafpetersen/dep-generic-methods/blob/master/proposal.m
d#function-subtyping> |
4883 * | 4914 * |
4884 * Parameters: | 4915 * Parameters: |
4885 * 0: the type parameter name | 4916 * 0: the type parameter name |
4886 * 1: the type parameter bound | 4917 * 1: the type parameter bound |
4887 * 2: the overridden type parameter name | 4918 * 2: the overridden type parameter name |
4888 * 3: the overridden type parameter bound | 4919 * 3: the overridden type parameter bound |
4889 * 4: the name of the class where the overridden method is declared | 4920 * 4: the name of the class where the overridden method is declared |
4890 */ | 4921 */ |
4891 static const StaticWarningCode INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND = | 4922 static const StaticWarningCode INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND = |
4892 const StaticWarningCode( | 4923 const StaticWarningCode('INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND', |
4893 'INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND', | |
4894 "The type parameter '{0}' extends '{1}', but that is stricter than '{2
}' extends '{3}' in the overridden method from '{4}'"); | 4924 "The type parameter '{0}' extends '{1}', but that is stricter than '{2
}' extends '{3}' in the overridden method from '{4}'"); |
4895 | 4925 |
4896 /** | 4926 /** |
4897 * 7.1 Instance Methods: It is a static warning if an instance method | 4927 * 7.1 Instance Methods: It is a static warning if an instance method |
4898 * <i>m1</i> overrides an instance method <i>m2</i> and the type of <i>m1</i> | 4928 * <i>m1</i> overrides an instance method <i>m2</i> and the type of <i>m1</i> |
4899 * is not a subtype of the type of <i>m2</i>. | 4929 * is not a subtype of the type of <i>m2</i>. |
4900 * | 4930 * |
4901 * Parameters: | 4931 * Parameters: |
4902 * 0: the name of the actual parameter type | 4932 * 0: the name of the actual parameter type |
4903 * 1: the name of the expected parameter type, not assignable to the actual | 4933 * 1: the name of the expected parameter type, not assignable to the actual |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4941 const StaticWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', | 4971 const StaticWarningCode('INVALID_METHOD_OVERRIDE_RETURN_TYPE', |
4942 "The return type '{0}' is not assignable to '{1}' as required by the m
ethod it is overriding from '{2}'"); | 4972 "The return type '{0}' is not assignable to '{1}' as required by the m
ethod it is overriding from '{2}'"); |
4943 | 4973 |
4944 /** | 4974 /** |
4945 * 7.1 Instance Methods: It is a static warning if an instance method | 4975 * 7.1 Instance Methods: It is a static warning if an instance method |
4946 * <i>m1</i> overrides an instance member <i>m2</i>, the signature of | 4976 * <i>m1</i> overrides an instance member <i>m2</i>, the signature of |
4947 * <i>m2</i> explicitly specifies a default value for a formal parameter | 4977 * <i>m2</i> explicitly specifies a default value for a formal parameter |
4948 * <i>p</i> and the signature of <i>m1</i> specifies a different default value | 4978 * <i>p</i> and the signature of <i>m1</i> specifies a different default value |
4949 * for <i>p</i>. | 4979 * for <i>p</i>. |
4950 */ | 4980 */ |
4951 static const StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED
= | 4981 static const StaticWarningCode |
4952 const StaticWarningCode('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', | 4982 INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = const StaticWarningCode( |
| 4983 'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED', |
4953 "Parameters cannot override default values, this method overrides '{0}
.{1}' where '{2}' has a different value"); | 4984 "Parameters cannot override default values, this method overrides '{0}
.{1}' where '{2}' has a different value"); |
4954 | 4985 |
4955 /** | 4986 /** |
4956 * 7.1 Instance Methods: It is a static warning if an instance method | 4987 * 7.1 Instance Methods: It is a static warning if an instance method |
4957 * <i>m1</i> overrides an instance member <i>m2</i>, the signature of | 4988 * <i>m1</i> overrides an instance member <i>m2</i>, the signature of |
4958 * <i>m2</i> explicitly specifies a default value for a formal parameter | 4989 * <i>m2</i> explicitly specifies a default value for a formal parameter |
4959 * <i>p</i> and the signature of <i>m1</i> specifies a different default value | 4990 * <i>p</i> and the signature of <i>m1</i> specifies a different default value |
4960 * for <i>p</i>. | 4991 * for <i>p</i>. |
4961 */ | 4992 */ |
4962 static const StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT
IONAL = | 4993 static const StaticWarningCode |
| 4994 INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL = |
4963 const StaticWarningCode( | 4995 const StaticWarningCode( |
4964 'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL', | 4996 'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL', |
4965 "Parameters cannot override default values, this method overrides '{0}
.{1}' where this positional parameter has a different value"); | 4997 "Parameters cannot override default values, this method overrides '{0}
.{1}' where this positional parameter has a different value"); |
4966 | 4998 |
4967 /** | 4999 /** |
4968 * 7.1 Instance Methods: It is a static warning if an instance method | 5000 * 7.1 Instance Methods: It is a static warning if an instance method |
4969 * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> does not | 5001 * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> does not |
4970 * declare all the named parameters declared by <i>m2</i>. | 5002 * declare all the named parameters declared by <i>m2</i>. |
4971 * | 5003 * |
4972 * Parameters: | 5004 * Parameters: |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5085 */ | 5117 */ |
5086 static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = | 5118 static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = |
5087 const StaticWarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', | 5119 const StaticWarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', |
5088 "The parameter type for setter '{0}' is '{1}' which is not assignable
to its getter (of type '{2}')"); | 5120 "The parameter type for setter '{0}' is '{1}' which is not assignable
to its getter (of type '{2}')"); |
5089 | 5121 |
5090 /** | 5122 /** |
5091 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> | 5123 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> |
5092 * with argument type <i>T</i> and a getter named <i>v</i> with return type | 5124 * with argument type <i>T</i> and a getter named <i>v</i> with return type |
5093 * <i>S</i>, and <i>T</i> may not be assigned to <i>S</i>. | 5125 * <i>S</i>, and <i>T</i> may not be assigned to <i>S</i>. |
5094 */ | 5126 */ |
5095 static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTY
PE = | 5127 static const StaticWarningCode |
| 5128 MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE = |
5096 const StaticWarningCode( | 5129 const StaticWarningCode( |
5097 'MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE', | 5130 'MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE', |
5098 "The parameter type for setter '{0}' is '{1}' which is not assignable
to its getter (of type '{2}'), from superclass '{3}'"); | 5131 "The parameter type for setter '{0}' is '{1}' which is not assignable
to its getter (of type '{2}'), from superclass '{3}'"); |
5099 | 5132 |
5100 /** | 5133 /** |
5101 * 13.12 Return: It is a static warning if a function contains both one or | 5134 * 13.12 Return: It is a static warning if a function contains both one or |
5102 * more return statements of the form <i>return;</i> and one or more return | 5135 * more return statements of the form <i>return;</i> and one or more return |
5103 * statements of the form <i>return e;</i>. | 5136 * statements of the form <i>return e;</i>. |
5104 */ | 5137 */ |
5105 static const StaticWarningCode MIXED_RETURN_TYPES = const StaticWarningCode( | 5138 static const StaticWarningCode MIXED_RETURN_TYPES = const StaticWarningCode( |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5187 * is declared or inherited in a concrete class unless that member overrides a | 5220 * is declared or inherited in a concrete class unless that member overrides a |
5188 * concrete one. | 5221 * concrete one. |
5189 * | 5222 * |
5190 * Parameters: | 5223 * Parameters: |
5191 * 0: the name of the first member | 5224 * 0: the name of the first member |
5192 * 1: the name of the second member | 5225 * 1: the name of the second member |
5193 * 2: the name of the third member | 5226 * 2: the name of the third member |
5194 * 3: the name of the fourth member | 5227 * 3: the name of the fourth member |
5195 * 4: the number of additional missing members that aren't listed | 5228 * 4: the number of additional missing members that aren't listed |
5196 */ | 5229 */ |
5197 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV
E_PLUS = | 5230 static const StaticWarningCode |
| 5231 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS = |
5198 const StaticWarningCode( | 5232 const StaticWarningCode( |
5199 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', | 5233 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', |
5200 "Missing concrete implementation of {0}, {1}, {2}, {3} and {4} more"); | 5234 "Missing concrete implementation of {0}, {1}, {2}, {3} and {4} more"); |
5201 | 5235 |
5202 /** | 5236 /** |
5203 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract | 5237 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract |
5204 * class inherits an abstract method. | 5238 * class inherits an abstract method. |
5205 * | 5239 * |
5206 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not | 5240 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not |
5207 * declare its own <i>noSuchMethod()</i> method. It is a static warning if the | 5241 * declare its own <i>noSuchMethod()</i> method. It is a static warning if the |
5208 * implicit interface of <i>C</i> includes an instance member <i>m</i> of type | 5242 * implicit interface of <i>C</i> includes an instance member <i>m</i> of type |
5209 * <i>F</i> and <i>C</i> does not declare or inherit a corresponding instance | 5243 * <i>F</i> and <i>C</i> does not declare or inherit a corresponding instance |
5210 * member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. | 5244 * member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. |
5211 * | 5245 * |
5212 * 7.4 Abstract Instance Members: It is a static warning if an abstract member | 5246 * 7.4 Abstract Instance Members: It is a static warning if an abstract member |
5213 * is declared or inherited in a concrete class unless that member overrides a | 5247 * is declared or inherited in a concrete class unless that member overrides a |
5214 * concrete one. | 5248 * concrete one. |
5215 * | 5249 * |
5216 * Parameters: | 5250 * Parameters: |
5217 * 0: the name of the first member | 5251 * 0: the name of the first member |
5218 * 1: the name of the second member | 5252 * 1: the name of the second member |
5219 * 2: the name of the third member | 5253 * 2: the name of the third member |
5220 * 3: the name of the fourth member | 5254 * 3: the name of the fourth member |
5221 */ | 5255 */ |
5222 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU
R = | 5256 static const StaticWarningCode |
| 5257 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR = |
5223 const StaticWarningCode( | 5258 const StaticWarningCode( |
5224 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', | 5259 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', |
5225 "Missing concrete implementation of {0}, {1}, {2} and {3}"); | 5260 "Missing concrete implementation of {0}, {1}, {2} and {3}"); |
5226 | 5261 |
5227 /** | 5262 /** |
5228 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract | 5263 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract |
5229 * class inherits an abstract method. | 5264 * class inherits an abstract method. |
5230 * | 5265 * |
5231 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not | 5266 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not |
5232 * declare its own <i>noSuchMethod()</i> method. It is a static warning if the | 5267 * declare its own <i>noSuchMethod()</i> method. It is a static warning if the |
5233 * implicit interface of <i>C</i> includes an instance member <i>m</i> of type | 5268 * implicit interface of <i>C</i> includes an instance member <i>m</i> of type |
5234 * <i>F</i> and <i>C</i> does not declare or inherit a corresponding instance | 5269 * <i>F</i> and <i>C</i> does not declare or inherit a corresponding instance |
5235 * member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. | 5270 * member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. |
5236 * | 5271 * |
5237 * 7.4 Abstract Instance Members: It is a static warning if an abstract member | 5272 * 7.4 Abstract Instance Members: It is a static warning if an abstract member |
5238 * is declared or inherited in a concrete class unless that member overrides a | 5273 * is declared or inherited in a concrete class unless that member overrides a |
5239 * concrete one. | 5274 * concrete one. |
5240 * | 5275 * |
5241 * Parameters: | 5276 * Parameters: |
5242 * 0: the name of the member | 5277 * 0: the name of the member |
5243 */ | 5278 */ |
5244 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= | 5279 static const StaticWarningCode |
5245 const StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', | 5280 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = const StaticWarningCode( |
| 5281 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', |
5246 "Missing concrete implementation of {0}"); | 5282 "Missing concrete implementation of {0}"); |
5247 | 5283 |
5248 /** | 5284 /** |
5249 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract | 5285 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract |
5250 * class inherits an abstract method. | 5286 * class inherits an abstract method. |
5251 * | 5287 * |
5252 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not | 5288 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not |
5253 * declare its own <i>noSuchMethod()</i> method. It is a static warning if the | 5289 * declare its own <i>noSuchMethod()</i> method. It is a static warning if the |
5254 * implicit interface of <i>C</i> includes an instance member <i>m</i> of type | 5290 * implicit interface of <i>C</i> includes an instance member <i>m</i> of type |
5255 * <i>F</i> and <i>C</i> does not declare or inherit a corresponding instance | 5291 * <i>F</i> and <i>C</i> does not declare or inherit a corresponding instance |
5256 * member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. | 5292 * member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. |
5257 * | 5293 * |
5258 * 7.4 Abstract Instance Members: It is a static warning if an abstract member | 5294 * 7.4 Abstract Instance Members: It is a static warning if an abstract member |
5259 * is declared or inherited in a concrete class unless that member overrides a | 5295 * is declared or inherited in a concrete class unless that member overrides a |
5260 * concrete one. | 5296 * concrete one. |
5261 * | 5297 * |
5262 * Parameters: | 5298 * Parameters: |
5263 * 0: the name of the first member | 5299 * 0: the name of the first member |
5264 * 1: the name of the second member | 5300 * 1: the name of the second member |
5265 * 2: the name of the third member | 5301 * 2: the name of the third member |
5266 */ | 5302 */ |
5267 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR
EE = | 5303 static const StaticWarningCode |
| 5304 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE = |
5268 const StaticWarningCode( | 5305 const StaticWarningCode( |
5269 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', | 5306 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', |
5270 "Missing concrete implementation of {0}, {1} and {2}"); | 5307 "Missing concrete implementation of {0}, {1} and {2}"); |
5271 | 5308 |
5272 /** | 5309 /** |
5273 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract | 5310 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract |
5274 * class inherits an abstract method. | 5311 * class inherits an abstract method. |
5275 * | 5312 * |
5276 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not | 5313 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not |
5277 * declare its own <i>noSuchMethod()</i> method. It is a static warning if the | 5314 * declare its own <i>noSuchMethod()</i> method. It is a static warning if the |
5278 * implicit interface of <i>C</i> includes an instance member <i>m</i> of type | 5315 * implicit interface of <i>C</i> includes an instance member <i>m</i> of type |
5279 * <i>F</i> and <i>C</i> does not declare or inherit a corresponding instance | 5316 * <i>F</i> and <i>C</i> does not declare or inherit a corresponding instance |
5280 * member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. | 5317 * member <i>m</i> of type <i>F'</i> such that <i>F' <: F</i>. |
5281 * | 5318 * |
5282 * 7.4 Abstract Instance Members: It is a static warning if an abstract member | 5319 * 7.4 Abstract Instance Members: It is a static warning if an abstract member |
5283 * is declared or inherited in a concrete class unless that member overrides a | 5320 * is declared or inherited in a concrete class unless that member overrides a |
5284 * concrete one. | 5321 * concrete one. |
5285 * | 5322 * |
5286 * Parameters: | 5323 * Parameters: |
5287 * 0: the name of the first member | 5324 * 0: the name of the first member |
5288 * 1: the name of the second member | 5325 * 1: the name of the second member |
5289 */ | 5326 */ |
5290 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
= | 5327 static const StaticWarningCode |
5291 const StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', | 5328 NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = const StaticWarningCode( |
| 5329 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', |
5292 "Missing concrete implementation of {0} and {1}"); | 5330 "Missing concrete implementation of {0} and {1}"); |
5293 | 5331 |
5294 /** | 5332 /** |
5295 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, | 5333 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, |
5296 * p<sub>2</sub>) s</i> or <i>on T s</i> matches an object <i>o</i> if the | 5334 * p<sub>2</sub>) s</i> or <i>on T s</i> matches an object <i>o</i> if the |
5297 * type of <i>o</i> is a subtype of <i>T</i>. It is a static warning if | 5335 * type of <i>o</i> is a subtype of <i>T</i>. It is a static warning if |
5298 * <i>T</i> does not denote a type available in the lexical scope of the | 5336 * <i>T</i> does not denote a type available in the lexical scope of the |
5299 * catch clause. | 5337 * catch clause. |
5300 * | 5338 * |
5301 * Parameters: | 5339 * Parameters: |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5653 * Initialize a newly created error code to have the given [name]. | 5691 * Initialize a newly created error code to have the given [name]. |
5654 */ | 5692 */ |
5655 const TodoCode(String name) : super(name, "{0}"); | 5693 const TodoCode(String name) : super(name, "{0}"); |
5656 | 5694 |
5657 @override | 5695 @override |
5658 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 5696 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
5659 | 5697 |
5660 @override | 5698 @override |
5661 ErrorType get type => ErrorType.TODO; | 5699 ErrorType get type => ErrorType.TODO; |
5662 } | 5700 } |
OLD | NEW |