| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.error; | 8 library engine.error; |
| 9 | 9 |
| 10 import 'java_core.dart'; | 10 import 'java_core.dart'; |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 */ | 527 */ |
| 528 static const CompileTimeErrorCode CONST_FORMAL_PARAMETER = const CompileTimeEr
rorCode.con1('CONST_FORMAL_PARAMETER', 19, "Parameters cannot be 'const'"); | 528 static const CompileTimeErrorCode CONST_FORMAL_PARAMETER = const CompileTimeEr
rorCode.con1('CONST_FORMAL_PARAMETER', 19, "Parameters cannot be 'const'"); |
| 529 | 529 |
| 530 /** | 530 /** |
| 531 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a | 531 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
| 532 * compile-time error occurs. | 532 * compile-time error occurs. |
| 533 */ | 533 */ |
| 534 static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
const CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 20,
"'const' variables must be constant value"); | 534 static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
const CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 20,
"'const' variables must be constant value"); |
| 535 | 535 |
| 536 /** | 536 /** |
| 537 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
| 538 * compile-time error occurs. |
| 539 * |
| 540 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
| 541 * deferred prefix. |
| 542 */ |
| 543 static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FR
OM_DEFERRED_LIBRARY = const CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NO
N_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY', 21, "Constant values from a deferred li
brary cannot be used to initialized a 'const' variable"); |
| 544 |
| 545 /** |
| 537 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be | 546 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be |
| 538 * constant. | 547 * constant. |
| 539 */ | 548 */ |
| 540 static const CompileTimeErrorCode CONST_INSTANCE_FIELD = const CompileTimeErro
rCode.con1('CONST_INSTANCE_FIELD', 21, "Only static fields can be declared as 'c
onst'"); | 549 static const CompileTimeErrorCode CONST_INSTANCE_FIELD = const CompileTimeErro
rCode.con1('CONST_INSTANCE_FIELD', 22, "Only static fields can be declared as 'c
onst'"); |
| 541 | 550 |
| 542 /** | 551 /** |
| 543 * 12.8 Maps: It is a compile-time error if the key of an entry in a constant
map literal is an | 552 * 12.8 Maps: It is a compile-time error if the key of an entry in a constant
map literal is an |
| 544 * instance of a class that implements the operator <i>==</i> unless the key i
s a string or | 553 * instance of a class that implements the operator <i>==</i> unless the key i
s a string or |
| 545 * integer. | 554 * integer. |
| 546 */ | 555 */ |
| 547 static const CompileTimeErrorCode CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQU
ALS = const CompileTimeErrorCode.con1('CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_
EQUALS', 22, "The constant map entry key expression type '%s' cannot override th
e == operator"); | 556 static const CompileTimeErrorCode CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQU
ALS = const CompileTimeErrorCode.con1('CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_
EQUALS', 23, "The constant map entry key expression type '%s' cannot override th
e == operator"); |
| 548 | 557 |
| 549 /** | 558 /** |
| 550 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant (12.1) or a | 559 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant (12.1) or a |
| 551 * compile-time error occurs. | 560 * compile-time error occurs. |
| 552 * | 561 * |
| 553 * @param name the name of the uninitialized final variable | 562 * @param name the name of the uninitialized final variable |
| 554 */ | 563 */ |
| 555 static const CompileTimeErrorCode CONST_NOT_INITIALIZED = const CompileTimeErr
orCode.con1('CONST_NOT_INITIALIZED', 23, "The const variable '%s' must be initia
lized"); | 564 static const CompileTimeErrorCode CONST_NOT_INITIALIZED = const CompileTimeErr
orCode.con1('CONST_NOT_INITIALIZED', 24, "The const variable '%s' must be initia
lized"); |
| 556 | 565 |
| 557 /** | 566 /** |
| 558 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 | 567 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 |
| 559 * are constant expressions that evaluate to a boolean value. | 568 * are constant expressions that evaluate to a boolean value. |
| 560 */ | 569 */ |
| 561 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = const CompileTimeErro
rCode.con1('CONST_EVAL_TYPE_BOOL', 24, "An expression of type 'bool' was expecte
d"); | 570 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = const CompileTimeErro
rCode.con1('CONST_EVAL_TYPE_BOOL', 25, "An expression of type 'bool' was expecte
d"); |
| 562 | 571 |
| 563 /** | 572 /** |
| 564 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are | 573 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are |
| 565 * constant expressions that evaluate to a numeric, string or boolean value or
to null. | 574 * constant expressions that evaluate to a numeric, string or boolean value or
to null. |
| 566 */ | 575 */ |
| 567 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = const Comp
ileTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 25, "An expression of t
ype 'bool', 'num', 'String' or 'null' was expected"); | 576 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = const Comp
ileTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 26, "An expression of t
ype 'bool', 'num', 'String' or 'null' was expected"); |
| 568 | 577 |
| 569 /** | 578 /** |
| 570 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 | 579 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 |
| 571 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to | 580 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to |
| 572 * null. | 581 * null. |
| 573 */ | 582 */ |
| 574 static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = const CompileTimeError
Code.con1('CONST_EVAL_TYPE_INT', 26, "An expression of type 'int' was expected")
; | 583 static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = const CompileTimeError
Code.con1('CONST_EVAL_TYPE_INT', 27, "An expression of type 'int' was expected")
; |
| 575 | 584 |
| 576 /** | 585 /** |
| 577 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ | 586 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ |
| 578 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant | 587 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant |
| 579 * expressions that evaluate to a numeric value or to null.. | 588 * expressions that evaluate to a numeric value or to null.. |
| 580 */ | 589 */ |
| 581 static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = const CompileTimeError
Code.con1('CONST_EVAL_TYPE_NUM', 27, "An expression of type 'num' was expected")
; | 590 static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = const CompileTimeError
Code.con1('CONST_EVAL_TYPE_NUM', 28, "An expression of type 'num' was expected")
; |
| 582 | 591 |
| 583 /** | 592 /** |
| 584 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 593 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 585 * uncaught exception being thrown. | 594 * uncaught exception being thrown. |
| 586 */ | 595 */ |
| 587 static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = const CompileT
imeErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 28, "Evaluation of this constan
t expression causes exception"); | 596 static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = const CompileT
imeErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 29, "Evaluation of this constan
t expression causes exception"); |
| 588 | 597 |
| 589 /** | 598 /** |
| 590 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 599 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 591 * uncaught exception being thrown. | 600 * uncaught exception being thrown. |
| 592 */ | 601 */ |
| 593 static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = const CompileTimeE
rrorCode.con1('CONST_EVAL_THROWS_IDBZE', 29, "Evaluation of this constant expres
sion throws IntegerDivisionByZeroException"); | 602 static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = const CompileTimeE
rrorCode.con1('CONST_EVAL_THROWS_IDBZE', 30, "Evaluation of this constant expres
sion throws IntegerDivisionByZeroException"); |
| 594 | 603 |
| 595 /** | 604 /** |
| 596 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, | 605 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, |
| 597 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a | 606 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a |
| 598 * generic type with <i>m</i> type parameters. | 607 * generic type with <i>m</i> type parameters. |
| 599 * | 608 * |
| 600 * @param typeName the name of the type being referenced (<i>S</i>) | 609 * @param typeName the name of the type being referenced (<i>S</i>) |
| 601 * @param parameterCount the number of type parameters that were declared | 610 * @param parameterCount the number of type parameters that were declared |
| 602 * @param argumentCount the number of type arguments provided | 611 * @param argumentCount the number of type arguments provided |
| 603 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS | 612 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
| 604 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS | 613 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
| 605 */ | 614 */ |
| 606 static const CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = const C
ompileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 30, "The type '%s
' is declared with %d type parameters, but %d type arguments were given"); | 615 static const CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = const C
ompileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 31, "The type '%s
' is declared with %d type parameters, but %d type arguments were given"); |
| 607 | 616 |
| 608 /** | 617 /** |
| 609 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, | 618 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, |
| 610 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 619 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
| 611 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same | 620 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same |
| 612 * name as the declaration of <i>T</i>. | 621 * name as the declaration of <i>T</i>. |
| 613 */ | 622 */ |
| 614 static const CompileTimeErrorCode CONST_WITH_NON_CONST = const CompileTimeErro
rCode.con1('CONST_WITH_NON_CONST', 31, "The constructor being called is not a 'c
onst' constructor"); | 623 static const CompileTimeErrorCode CONST_WITH_NON_CONST = const CompileTimeErro
rCode.con1('CONST_WITH_NON_CONST', 32, "The constructor being called is not a 'c
onst' constructor"); |
| 615 | 624 |
| 616 /** | 625 /** |
| 617 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 | 626 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 |
| 618 * <= i <= n + k</i>, is not a compile-time constant expression. | 627 * <= i <= n + k</i>, is not a compile-time constant expression. |
| 619 */ | 628 */ |
| 620 static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = const Com
pileTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 32, "Arguments of a c
onstant creation must be constant expressions"); | 629 static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = const Com
pileTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 33, "Arguments of a c
onstant creation must be constant expressions"); |
| 621 | 630 |
| 622 /** | 631 /** |
| 623 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 632 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 624 * scope, optionally followed by type arguments. | 633 * scope, optionally followed by type arguments. |
| 625 * | 634 * |
| 626 * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>, &hel
lip;, a<sub>n</sub>, | 635 * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>, &hel
lip;, a<sub>n</sub>, |
| 627 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a | 636 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a |
| 628 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally | 637 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally |
| 629 * followed by type arguments. | 638 * followed by type arguments. |
| 630 * | 639 * |
| 631 * @param name the name of the non-type element | 640 * @param name the name of the non-type element |
| 632 */ | 641 */ |
| 633 static const CompileTimeErrorCode CONST_WITH_NON_TYPE = const CompileTimeError
Code.con1('CONST_WITH_NON_TYPE', 33, "The name '%s' is not a class"); | 642 static const CompileTimeErrorCode CONST_WITH_NON_TYPE = const CompileTimeError
Code.con1('CONST_WITH_NON_TYPE', 34, "The name '%s' is not a class"); |
| 634 | 643 |
| 635 /** | 644 /** |
| 636 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. | 645 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. |
| 637 */ | 646 */ |
| 638 static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = const CompileTi
meErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 34, "The constant creation cannot
use a type parameter"); | 647 static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = const CompileTi
meErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 35, "The constant creation cannot
use a type parameter"); |
| 639 | 648 |
| 640 /** | 649 /** |
| 641 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 650 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 642 * constructor declared by the type <i>T</i>. | 651 * constructor declared by the type <i>T</i>. |
| 643 * | 652 * |
| 644 * @param typeName the name of the type | 653 * @param typeName the name of the type |
| 645 * @param constructorName the name of the requested constant constructor | 654 * @param constructorName the name of the requested constant constructor |
| 646 */ | 655 */ |
| 647 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 35, "The class '%s' d
oes not have a constant constructor '%s'"); | 656 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 36, "The class '%s' d
oes not have a constant constructor '%s'"); |
| 648 | 657 |
| 649 /** | 658 /** |
| 650 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 659 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
| 651 * constructor declared by the type <i>T</i>. | 660 * constructor declared by the type <i>T</i>. |
| 652 * | 661 * |
| 653 * @param typeName the name of the type | 662 * @param typeName the name of the type |
| 654 */ | 663 */ |
| 655 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = c
onst CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 36, "
The class '%s' does not have a default constant constructor"); | 664 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = c
onst CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 37, "
The class '%s' does not have a default constant constructor"); |
| 656 | 665 |
| 657 /** | 666 /** |
| 658 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature | 667 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature |
| 659 * of a function type alias. | 668 * of a function type alias. |
| 660 */ | 669 */ |
| 661 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = const
CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 37, "Default
values aren't allowed in typedefs"); | 670 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = const
CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 38, "Default
values aren't allowed in typedefs"); |
| 662 | 671 |
| 663 /** | 672 /** |
| 664 * 6.2.1 Required Formals: By means of a function signature that names the par
ameter and describes | 673 * 6.2.1 Required Formals: By means of a function signature that names the par
ameter and describes |
| 665 * its type as a function type. It is a compile-time error if any default valu
es are specified in | 674 * its type as a function type. It is a compile-time error if any default valu
es are specified in |
| 666 * the signature of such a function type. | 675 * the signature of such a function type. |
| 667 */ | 676 */ |
| 668 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER =
const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 38,
"Default values aren't allowed in function type parameters"); | 677 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER =
const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 39,
"Default values aren't allowed in function type parameters"); |
| 669 | 678 |
| 670 /** | 679 /** |
| 671 * 7.6.2 Factories: It is a compile-time error if <i>k</i> explicitly specifie
s a default value | 680 * 7.6.2 Factories: It is a compile-time error if <i>k</i> explicitly specifie
s a default value |
| 672 * for an optional parameter. | 681 * for an optional parameter. |
| 673 */ | 682 */ |
| 674 static const CompileTimeErrorCode DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRU
CTOR = const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CON
STRUCTOR', 39, "Default values aren't allowed in factory constructors that redir
ect to another constructor"); | 683 static const CompileTimeErrorCode DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRU
CTOR = const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CON
STRUCTOR', 40, "Default values aren't allowed in factory constructors that redir
ect to another constructor"); |
| 675 | 684 |
| 676 /** | 685 /** |
| 677 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 686 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 678 * declared in the same scope. | 687 * declared in the same scope. |
| 679 */ | 688 */ |
| 680 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = const Compil
eTimeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 40, "The default constructo
r is already defined"); | 689 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = const Compil
eTimeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 41, "The default constructo
r is already defined"); |
| 681 | 690 |
| 682 /** | 691 /** |
| 683 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 692 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 684 * declared in the same scope. | 693 * declared in the same scope. |
| 685 * | 694 * |
| 686 * @param duplicateName the name of the duplicate entity | 695 * @param duplicateName the name of the duplicate entity |
| 687 */ | 696 */ |
| 688 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = const CompileTi
meErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 41, "The constructor with name '%
s' is already defined"); | 697 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = const CompileTi
meErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 42, "The constructor with name '%
s' is already defined"); |
| 689 | 698 |
| 690 /** | 699 /** |
| 691 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 700 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
| 692 * declared in the same scope. | 701 * declared in the same scope. |
| 693 * | 702 * |
| 694 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. | 703 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. |
| 695 * | 704 * |
| 696 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member | 705 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member |
| 697 * with the same name. | 706 * with the same name. |
| 698 * | 707 * |
| 699 * @param duplicateName the name of the duplicate entity | 708 * @param duplicateName the name of the duplicate entity |
| 700 */ | 709 */ |
| 701 static const CompileTimeErrorCode DUPLICATE_DEFINITION = const CompileTimeErro
rCode.con1('DUPLICATE_DEFINITION', 42, "The name '%s' is already defined"); | 710 static const CompileTimeErrorCode DUPLICATE_DEFINITION = const CompileTimeErro
rCode.con1('DUPLICATE_DEFINITION', 43, "The name '%s' is already defined"); |
| 702 | 711 |
| 703 /** | 712 /** |
| 704 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member | 713 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member |
| 705 * with the same name. | 714 * with the same name. |
| 706 * | 715 * |
| 707 * This covers the additional duplicate definition cases where inheritance has
to be considered. | 716 * This covers the additional duplicate definition cases where inheritance has
to be considered. |
| 708 * | 717 * |
| 709 * @param className the name of the class that has conflicting instance/static
members | 718 * @param className the name of the class that has conflicting instance/static
members |
| 710 * @param name the name of the conflicting members | 719 * @param name the name of the conflicting members |
| 711 * @see #DUPLICATE_DEFINITION | 720 * @see #DUPLICATE_DEFINITION |
| 712 */ | 721 */ |
| 713 static const CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = const Com
pileTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 43, "The name '%s' is
already defined in '%s'"); | 722 static const CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = const Com
pileTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 44, "The name '%s' is
already defined in '%s'"); |
| 714 | 723 |
| 715 /** | 724 /** |
| 716 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = | 725 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = |
| 717 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named | 726 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named |
| 718 * argument]. | 727 * argument]. |
| 719 */ | 728 */ |
| 720 static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = const CompileTime
ErrorCode.con1('DUPLICATE_NAMED_ARGUMENT', 44, "The argument for the named param
eter '%s' was already specified"); | 729 static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = const CompileTime
ErrorCode.con1('DUPLICATE_NAMED_ARGUMENT', 45, "The argument for the named param
eter '%s' was already specified"); |
| 721 | 730 |
| 722 /** | 731 /** |
| 723 * SDK implementation libraries can be exported only by other SDK libraries. | 732 * SDK implementation libraries can be exported only by other SDK libraries. |
| 724 * | 733 * |
| 725 * @param uri the uri pointing to a library | 734 * @param uri the uri pointing to a library |
| 726 */ | 735 */ |
| 727 static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = const CompileTimeE
rrorCode.con1('EXPORT_INTERNAL_LIBRARY', 45, "The library '%s' is internal and c
annot be exported"); | 736 static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = const CompileTimeE
rrorCode.con1('EXPORT_INTERNAL_LIBRARY', 46, "The library '%s' is internal and c
annot be exported"); |
| 728 | 737 |
| 729 /** | 738 /** |
| 730 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 739 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 731 * not a library declaration. | 740 * not a library declaration. |
| 732 * | 741 * |
| 733 * @param uri the uri pointing to a non-library declaration | 742 * @param uri the uri pointing to a non-library declaration |
| 734 */ | 743 */ |
| 735 static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = const CompileTimeErr
orCode.con1('EXPORT_OF_NON_LIBRARY', 46, "The exported library '%s' must not hav
e a part-of directive"); | 744 static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = const CompileTimeErr
orCode.con1('EXPORT_OF_NON_LIBRARY', 47, "The exported library '%s' must not hav
e a part-of directive"); |
| 736 | 745 |
| 737 /** | 746 /** |
| 738 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 747 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
| 739 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. | 748 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. |
| 740 * | 749 * |
| 741 * @param typeName the name of the superclass that was not found | 750 * @param typeName the name of the superclass that was not found |
| 742 */ | 751 */ |
| 743 static const CompileTimeErrorCode EXTENDS_NON_CLASS = const CompileTimeErrorCo
de.con1('EXTENDS_NON_CLASS', 47, "Classes can only extend other classes"); | 752 static const CompileTimeErrorCode EXTENDS_NON_CLASS = const CompileTimeErrorCo
de.con1('EXTENDS_NON_CLASS', 48, "Classes can only extend other classes"); |
| 744 | 753 |
| 745 /** | 754 /** |
| 746 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 755 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 747 * | 756 * |
| 748 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 757 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 749 * | 758 * |
| 750 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 759 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 751 * | 760 * |
| 752 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 761 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 753 * attempt to extend or implement num. | 762 * attempt to extend or implement num. |
| 754 * | 763 * |
| 755 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 764 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 756 * | 765 * |
| 757 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 766 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 758 * | 767 * |
| 759 * @param typeName the name of the type that cannot be extended | 768 * @param typeName the name of the type that cannot be extended |
| 760 * @see #IMPLEMENTS_DISALLOWED_CLASS | 769 * @see #IMPLEMENTS_DISALLOWED_CLASS |
| 761 */ | 770 */ |
| 762 static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = const CompileTime
ErrorCode.con1('EXTENDS_DISALLOWED_CLASS', 48, "Classes cannot extend '%s'"); | 771 static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = const CompileTime
ErrorCode.con1('EXTENDS_DISALLOWED_CLASS', 49, "Classes cannot extend '%s'"); |
| 763 | 772 |
| 764 /** | 773 /** |
| 765 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 774 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
| 766 * a deferred type expression. | 775 * a deferred type expression. |
| 767 * | 776 * |
| 768 * @param typeName the name of the type that cannot be extended | 777 * @param typeName the name of the type that cannot be extended |
| 769 * @see #IMPLEMENTS_DEFERRED_CLASS | 778 * @see #IMPLEMENTS_DEFERRED_CLASS |
| 770 * @see #MIXIN_DEFERRED_CLASS | 779 * @see #MIXIN_DEFERRED_CLASS |
| 771 */ | 780 */ |
| 772 static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS = const CompileTimeEr
rorCode.con1('EXTENDS_DEFERRED_CLASS', 49, "This class cannot extend the deferre
d class '%s'"); | 781 static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS = const CompileTimeEr
rorCode.con1('EXTENDS_DEFERRED_CLASS', 50, "This class cannot extend the deferre
d class '%s'"); |
| 773 | 782 |
| 774 /** | 783 /** |
| 775 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 784 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
| 776 * n</i>. | 785 * n</i>. |
| 777 * | 786 * |
| 778 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 787 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 779 * uncaught exception being thrown. | 788 * uncaught exception being thrown. |
| 780 * | 789 * |
| 781 * @param requiredCount the maximum number of positional arguments | 790 * @param requiredCount the maximum number of positional arguments |
| 782 * @param argumentCount the actual number of positional arguments given | 791 * @param argumentCount the actual number of positional arguments given |
| 783 */ | 792 */ |
| 784 static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = const CompileTi
meErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 50, "%d positional arguments expe
cted, but %d found"); | 793 static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = const CompileTi
meErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 51, "%d positional arguments expe
cted, but %d found"); |
| 785 | 794 |
| 786 /** | 795 /** |
| 787 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 796 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 788 * error if more than one initializer corresponding to a given instance variab
le appears in | 797 * error if more than one initializer corresponding to a given instance variab
le appears in |
| 789 * <i>k</i>'s list. | 798 * <i>k</i>'s list. |
| 790 */ | 799 */ |
| 791 static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
const CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 5
1, "The field '%s' cannot be initialized twice in the same constructor"); | 800 static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
const CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 5
2, "The field '%s' cannot be initialized twice in the same constructor"); |
| 792 | 801 |
| 793 /** | 802 /** |
| 794 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 803 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
| 795 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized | 804 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized |
| 796 * by means of an initializing formal of <i>k</i>. | 805 * by means of an initializing formal of <i>k</i>. |
| 797 */ | 806 */ |
| 798 static const CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = const CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIAL
IZER', 52, "Fields cannot be initialized in both the parameter list and the init
ializers"); | 807 static const CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = const CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIAL
IZER', 53, "Fields cannot be initialized in both the parameter list and the init
ializers"); |
| 799 | 808 |
| 800 /** | 809 /** |
| 801 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 810 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
| 802 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 811 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
| 803 * constructor. | 812 * constructor. |
| 804 * | 813 * |
| 805 * @param name the name of the field in question | 814 * @param name the name of the field in question |
| 806 */ | 815 */ |
| 807 static const CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = const Com
pileTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 53, "'%s' is a final
field and so can only be set once"); | 816 static const CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = const Com
pileTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 54, "'%s' is a final
field and so can only be set once"); |
| 808 | 817 |
| 809 /** | 818 /** |
| 810 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 819 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 811 * a function other than a non-redirecting generative constructor. | 820 * a function other than a non-redirecting generative constructor. |
| 812 */ | 821 */ |
| 813 static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = cons
t CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 54, "Initia
lizing formal fields cannot be used in factory constructors"); | 822 static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = cons
t CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 55, "Initia
lizing formal fields cannot be used in factory constructors"); |
| 814 | 823 |
| 815 /** | 824 /** |
| 816 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 825 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 817 * a function other than a non-redirecting generative constructor. | 826 * a function other than a non-redirecting generative constructor. |
| 818 */ | 827 */ |
| 819 static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = cons
t CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 55, "Initia
lizing formal fields can only be used in constructors"); | 828 static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = cons
t CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 56, "Initia
lizing formal fields can only be used in constructors"); |
| 820 | 829 |
| 821 /** | 830 /** |
| 822 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 831 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 823 * only action is to invoke another generative constructor. | 832 * only action is to invoke another generative constructor. |
| 824 * | 833 * |
| 825 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 834 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
| 826 * a function other than a non-redirecting generative constructor. | 835 * a function other than a non-redirecting generative constructor. |
| 827 */ | 836 */ |
| 828 static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
const CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 56,
"The redirecting constructor cannot have a field initializer"); | 837 static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
const CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 57,
"The redirecting constructor cannot have a field initializer"); |
| 829 | 838 |
| 830 /** | 839 /** |
| 831 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 840 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 832 * name. | 841 * name. |
| 833 * | 842 * |
| 834 * @param name the conflicting name of the getter and method | 843 * @param name the conflicting name of the getter and method |
| 835 */ | 844 */ |
| 836 static const CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = const Com
pileTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 57, "'%s' cannot be u
sed to name a getter, there is already a method with the same name"); | 845 static const CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = const Com
pileTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 58, "'%s' cannot be u
sed to name a getter, there is already a method with the same name"); |
| 837 | 846 |
| 838 /** | 847 /** |
| 839 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 848 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
| 840 * specifies a malformed type or deferred type as a superinterface. | 849 * specifies a malformed type or deferred type as a superinterface. |
| 841 * | 850 * |
| 842 * @param typeName the name of the type that cannot be extended | 851 * @param typeName the name of the type that cannot be extended |
| 843 * @see #EXTENDS_DEFERRED_CLASS | 852 * @see #EXTENDS_DEFERRED_CLASS |
| 844 * @see #MIXIN_DEFERRED_CLASS | 853 * @see #MIXIN_DEFERRED_CLASS |
| 845 */ | 854 */ |
| 846 static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS = const CompileTim
eErrorCode.con1('IMPLEMENTS_DEFERRED_CLASS', 58, "This class cannot implement th
e deferred class '%s'"); | 855 static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS = const CompileTim
eErrorCode.con1('IMPLEMENTS_DEFERRED_CLASS', 59, "This class cannot implement th
e deferred class '%s'"); |
| 847 | 856 |
| 848 /** | 857 /** |
| 849 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 858 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 850 * | 859 * |
| 851 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 860 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 852 * | 861 * |
| 853 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 862 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 854 * | 863 * |
| 855 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 864 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 856 * attempt to extend or implement num. | 865 * attempt to extend or implement num. |
| 857 * | 866 * |
| 858 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 867 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 859 * | 868 * |
| 860 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 869 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 861 * | 870 * |
| 862 * @param typeName the name of the type that cannot be implemented | 871 * @param typeName the name of the type that cannot be implemented |
| 863 * @see #EXTENDS_DISALLOWED_CLASS | 872 * @see #EXTENDS_DISALLOWED_CLASS |
| 864 */ | 873 */ |
| 865 static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = const CompileT
imeErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 59, "Classes cannot implement '
%s'"); | 874 static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = const CompileT
imeErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 60, "Classes cannot implement '
%s'"); |
| 866 | 875 |
| 867 /** | 876 /** |
| 868 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes | 877 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes |
| 869 * type dynamic. | 878 * type dynamic. |
| 870 */ | 879 */ |
| 871 static const CompileTimeErrorCode IMPLEMENTS_DYNAMIC = const CompileTimeErrorC
ode.con1('IMPLEMENTS_DYNAMIC', 60, "Classes cannot implement 'dynamic'"); | 880 static const CompileTimeErrorCode IMPLEMENTS_DYNAMIC = const CompileTimeErrorC
ode.con1('IMPLEMENTS_DYNAMIC', 61, "Classes cannot implement 'dynamic'"); |
| 872 | 881 |
| 873 /** | 882 /** |
| 874 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 883 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
| 875 * includes a type expression that does not denote a class available in the le
xical scope of | 884 * includes a type expression that does not denote a class available in the le
xical scope of |
| 876 * <i>C</i>. | 885 * <i>C</i>. |
| 877 * | 886 * |
| 878 * @param typeName the name of the interface that was not found | 887 * @param typeName the name of the interface that was not found |
| 879 */ | 888 */ |
| 880 static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = const CompileTimeErro
rCode.con1('IMPLEMENTS_NON_CLASS', 61, "Classes can only implement other classes
"); | 889 static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = const CompileTimeErro
rCode.con1('IMPLEMENTS_NON_CLASS', 62, "Classes can only implement other classes
"); |
| 881 | 890 |
| 882 /** | 891 /** |
| 883 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in | 892 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in |
| 884 * the implements clause of a class. | 893 * the implements clause of a class. |
| 885 * | 894 * |
| 886 * @param className the name of the class that is implemented more than once | 895 * @param className the name of the class that is implemented more than once |
| 887 */ | 896 */ |
| 888 static const CompileTimeErrorCode IMPLEMENTS_REPEATED = const CompileTimeError
Code.con1('IMPLEMENTS_REPEATED', 62, "'%s' can only be implemented once"); | 897 static const CompileTimeErrorCode IMPLEMENTS_REPEATED = const CompileTimeError
Code.con1('IMPLEMENTS_REPEATED', 63, "'%s' can only be implemented once"); |
| 889 | 898 |
| 890 /** | 899 /** |
| 891 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears | 900 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears |
| 892 * in the implements clause of <i>C</i>. | 901 * in the implements clause of <i>C</i>. |
| 893 * | 902 * |
| 894 * @param className the name of the class that appears in both "extends" and "
implements" clauses | 903 * @param className the name of the class that appears in both "extends" and "
implements" clauses |
| 895 */ | 904 */ |
| 896 static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = const CompileTimeEr
rorCode.con1('IMPLEMENTS_SUPER_CLASS', 63, "'%s' cannot be used in both 'extends
' and 'implements' clauses"); | 905 static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = const CompileTimeEr
rorCode.con1('IMPLEMENTS_SUPER_CLASS', 64, "'%s' cannot be used in both 'extends
' and 'implements' clauses"); |
| 897 | 906 |
| 898 /** | 907 /** |
| 899 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of | 908 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of |
| 900 * an initializer. | 909 * an initializer. |
| 901 * | 910 * |
| 902 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 911 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 903 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 912 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 904 * initializer of an instance variable. | 913 * initializer of an instance variable. |
| 905 * | 914 * |
| 906 * @param name the name of the type in question | 915 * @param name the name of the type in question |
| 907 */ | 916 */ |
| 908 static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = con
st CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 64, "Only
static members can be accessed in initializers"); | 917 static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = con
st CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 65, "Only
static members can be accessed in initializers"); |
| 909 | |
| 910 /** | |
| 911 * Speculative. | |
| 912 * | |
| 913 * TODO (jwren) Revisit to remove after we know for sure that this won't be in
the Spec. | |
| 914 */ | |
| 915 static const CompileTimeErrorCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION =
const CompileTimeErrorCode.con1('IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION', 6
5, "The library '%s' defines a top-level function named 'loadLibrary' and theref
ore cannot be deferred"); | |
| 916 | 918 |
| 917 /** | 919 /** |
| 918 * SDK implementation libraries can be imported only by other SDK libraries. | 920 * SDK implementation libraries can be imported only by other SDK libraries. |
| 919 * | 921 * |
| 920 * @param uri the uri pointing to a library | 922 * @param uri the uri pointing to a library |
| 921 */ | 923 */ |
| 922 static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = const CompileTimeE
rrorCode.con1('IMPORT_INTERNAL_LIBRARY', 66, "The library '%s' is internal and c
annot be imported"); | 924 static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = const CompileTimeE
rrorCode.con1('IMPORT_INTERNAL_LIBRARY', 66, "The library '%s' is internal and c
annot be imported"); |
| 923 | 925 |
| 924 /** | 926 /** |
| 925 * 14.1 Imports: It is a compile-time error if the specified URI of an immedia
te import does not | 927 * 14.1 Imports: It is a compile-time error if the specified URI of an immedia
te import does not |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = const C
ompileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 73, "Instance mem
ber cannot be accessed from static method"); | 993 static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = const C
ompileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 73, "Instance mem
ber cannot be accessed from static method"); |
| 992 | 994 |
| 993 /** | 995 /** |
| 994 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 996 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 995 * character @, followed by a constant expression that must be either a refere
nce to a | 997 * character @, followed by a constant expression that must be either a refere
nce to a |
| 996 * compile-time constant variable, or a call to a constant constructor. | 998 * compile-time constant variable, or a call to a constant constructor. |
| 997 */ | 999 */ |
| 998 static const CompileTimeErrorCode INVALID_ANNOTATION = const CompileTimeErrorC
ode.con1('INVALID_ANNOTATION', 74, "Annotation can be only constant variable or
constant constructor invocation"); | 1000 static const CompileTimeErrorCode INVALID_ANNOTATION = const CompileTimeErrorC
ode.con1('INVALID_ANNOTATION', 74, "Annotation can be only constant variable or
constant constructor invocation"); |
| 999 | 1001 |
| 1000 /** | 1002 /** |
| 1003 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1004 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1005 * compile-time constant variable, or a call to a constant constructor. |
| 1006 * |
| 1007 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
| 1008 * deferred prefix. |
| 1009 */ |
| 1010 static const CompileTimeErrorCode INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY = c
onst CompileTimeErrorCode.con1('INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY', 75, "
Constant values from a deferred library cannot be used as annotations"); |
| 1011 |
| 1012 /** |
| 1001 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time | 1013 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time |
| 1002 * constants. Until then, this acts as a placeholder for more informative erro
rs. | 1014 * constants. Until then, this acts as a placeholder for more informative erro
rs. |
| 1003 * | 1015 * |
| 1004 * See TODOs in ConstantVisitor | 1016 * See TODOs in ConstantVisitor |
| 1005 */ | 1017 */ |
| 1006 static const CompileTimeErrorCode INVALID_CONSTANT = const CompileTimeErrorCod
e.con1('INVALID_CONSTANT', 75, "Invalid constant value"); | 1018 static const CompileTimeErrorCode INVALID_CONSTANT = const CompileTimeErrorCod
e.con1('INVALID_CONSTANT', 76, "Invalid constant value"); |
| 1007 | 1019 |
| 1008 /** | 1020 /** |
| 1009 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor | 1021 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor |
| 1010 * name. | 1022 * name. |
| 1011 */ | 1023 */ |
| 1012 static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = const CompileTime
ErrorCode.con1('INVALID_CONSTRUCTOR_NAME', 76, "Invalid constructor name"); | 1024 static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = const CompileTime
ErrorCode.con1('INVALID_CONSTRUCTOR_NAME', 77, "Invalid constructor name"); |
| 1013 | 1025 |
| 1014 /** | 1026 /** |
| 1015 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately | 1027 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately |
| 1016 * enclosing class. | 1028 * enclosing class. |
| 1017 */ | 1029 */ |
| 1018 static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = const Com
pileTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 77, "The name of the
immediately enclosing class expected"); | 1030 static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = const Com
pileTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 78, "The name of the
immediately enclosing class expected"); |
| 1019 | 1031 |
| 1020 /** | 1032 /** |
| 1021 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1033 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
| 1022 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1034 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
| 1023 * initializer of an instance variable. | 1035 * initializer of an instance variable. |
| 1024 */ | 1036 */ |
| 1025 static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = const CompileTim
eErrorCode.con1('INVALID_REFERENCE_TO_THIS', 78, "Invalid reference to 'this' ex
pression"); | 1037 static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = const CompileTim
eErrorCode.con1('INVALID_REFERENCE_TO_THIS', 79, "Invalid reference to 'this' ex
pression"); |
| 1026 | 1038 |
| 1027 /** | 1039 /** |
| 1028 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes | 1040 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes |
| 1029 * a type parameter. | 1041 * a type parameter. |
| 1030 * | 1042 * |
| 1031 * @name the name of the type parameter | 1043 * @name the name of the type parameter |
| 1032 */ | 1044 */ |
| 1033 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = const
CompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 79, "Constant l
ist literals cannot include a type parameter as a type argument, such as '%s'"); | 1045 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = const
CompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 80, "Constant l
ist literals cannot include a type parameter as a type argument, such as '%s'"); |
| 1034 | 1046 |
| 1035 /** | 1047 /** |
| 1036 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a | 1048 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a |
| 1037 * type parameter. | 1049 * type parameter. |
| 1038 * | 1050 * |
| 1039 * @name the name of the type parameter | 1051 * @name the name of the type parameter |
| 1040 */ | 1052 */ |
| 1041 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = const C
ompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 80, "Constant map
literals cannot include a type parameter as a type argument, such as '%s'"); | 1053 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = const C
ompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 81, "Constant map
literals cannot include a type parameter as a type argument, such as '%s'"); |
| 1042 | 1054 |
| 1043 /** | 1055 /** |
| 1044 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1056 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1045 * not a library declaration. | 1057 * not a library declaration. |
| 1046 * | 1058 * |
| 1047 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1059 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1048 * not a library declaration. | 1060 * not a library declaration. |
| 1049 * | 1061 * |
| 1050 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1062 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1051 * declaration. | 1063 * declaration. |
| 1052 * | 1064 * |
| 1053 * @param uri the URI that is invalid | 1065 * @param uri the URI that is invalid |
| 1054 * @see #URI_DOES_NOT_EXIST | 1066 * @see #URI_DOES_NOT_EXIST |
| 1055 */ | 1067 */ |
| 1056 static const CompileTimeErrorCode INVALID_URI = const CompileTimeErrorCode.con
1('INVALID_URI', 81, "Invalid URI syntax: '%s'"); | 1068 static const CompileTimeErrorCode INVALID_URI = const CompileTimeErrorCode.con
1('INVALID_URI', 82, "Invalid URI syntax: '%s'"); |
| 1057 | 1069 |
| 1058 /** | 1070 /** |
| 1059 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1071 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1060 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1072 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1061 * | 1073 * |
| 1062 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1074 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1063 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1075 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1064 * | 1076 * |
| 1065 * @param labelName the name of the unresolvable label | 1077 * @param labelName the name of the unresolvable label |
| 1066 */ | 1078 */ |
| 1067 static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = const CompileTimeErro
rCode.con1('LABEL_IN_OUTER_SCOPE', 82, "Cannot reference label '%s' declared in
an outer method"); | 1079 static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = const CompileTimeErro
rCode.con1('LABEL_IN_OUTER_SCOPE', 83, "Cannot reference label '%s' declared in
an outer method"); |
| 1068 | 1080 |
| 1069 /** | 1081 /** |
| 1070 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1082 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
| 1071 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1083 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
| 1072 * | 1084 * |
| 1073 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1085 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
| 1074 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1086 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
| 1075 * | 1087 * |
| 1076 * @param labelName the name of the unresolvable label | 1088 * @param labelName the name of the unresolvable label |
| 1077 */ | 1089 */ |
| 1078 static const CompileTimeErrorCode LABEL_UNDEFINED = const CompileTimeErrorCode
.con1('LABEL_UNDEFINED', 83, "Cannot reference undefined label '%s'"); | 1090 static const CompileTimeErrorCode LABEL_UNDEFINED = const CompileTimeErrorCode
.con1('LABEL_UNDEFINED', 84, "Cannot reference undefined label '%s'"); |
| 1079 | 1091 |
| 1080 /** | 1092 /** |
| 1081 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... | 1093 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... |
| 1082 * <i>e<sub>n</sub></i>] is evaluated as follows: | 1094 * <i>e<sub>n</sub></i>] is evaluated as follows: |
| 1083 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument | 1095 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
| 1084 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 1096 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
| 1085 * | 1097 * |
| 1086 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1098 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1087 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1099 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1088 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. | 1100 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. |
| 1089 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1101 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1090 * j <= m</i>. | 1102 * j <= m</i>. |
| 1091 */ | 1103 */ |
| 1092 static const CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const Com
pileTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 84, "The element type
'%s' cannot be assigned to the list type '%s'"); | 1104 static const CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const Com
pileTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 85, "The element type
'%s' cannot be assigned to the list type '%s'"); |
| 1093 | 1105 |
| 1094 /** | 1106 /** |
| 1095 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1107 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1096 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1108 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1097 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1109 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1098 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1110 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1099 * | 1111 * |
| 1100 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1112 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1101 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1113 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1102 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. | 1114 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. |
| 1103 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1115 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1104 * j <= m</i>. | 1116 * j <= m</i>. |
| 1105 */ | 1117 */ |
| 1106 static const CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = const CompileT
imeErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 85, "The element type '%s' cann
ot be assigned to the map key type '%s'"); | 1118 static const CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = const CompileT
imeErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 86, "The element type '%s' cann
ot be assigned to the map key type '%s'"); |
| 1107 | 1119 |
| 1108 /** | 1120 /** |
| 1109 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1121 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
| 1110 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1122 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
| 1111 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1123 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
| 1112 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1124 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
| 1113 * | 1125 * |
| 1114 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1126 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
| 1115 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= | 1127 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s
ub>, 1 <= i <= |
| 1116 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. | 1128 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>
q</i> of <i>f</i>. |
| 1117 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1129 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
| 1118 * j <= m</i>. | 1130 * j <= m</i>. |
| 1119 */ | 1131 */ |
| 1120 static const CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = const Compil
eTimeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 86, "The element type '%s'
cannot be assigned to the map value type '%s'"); | 1132 static const CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = const Compil
eTimeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 87, "The element type '%s'
cannot be assigned to the map value type '%s'"); |
| 1121 | 1133 |
| 1122 /** | 1134 /** |
| 1123 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 1135 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
| 1124 * as <i>C</i>. | 1136 * as <i>C</i>. |
| 1125 */ | 1137 */ |
| 1126 static const CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = const CompileTimeEr
rorCode.con1('MEMBER_WITH_CLASS_NAME', 87, "Class members cannot have the same n
ame as the enclosing class"); | 1138 static const CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = const CompileTimeEr
rorCode.con1('MEMBER_WITH_CLASS_NAME', 88, "Class members cannot have the same n
ame as the enclosing class"); |
| 1127 | 1139 |
| 1128 /** | 1140 /** |
| 1129 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1141 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
| 1130 * name. | 1142 * name. |
| 1131 * | 1143 * |
| 1132 * @param name the conflicting name of the getter and method | 1144 * @param name the conflicting name of the getter and method |
| 1133 */ | 1145 */ |
| 1134 static const CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = const Com
pileTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 88, "'%s' cannot be u
sed to name a method, there is already a getter with the same name"); | 1146 static const CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = const Com
pileTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 89, "'%s' cannot be u
sed to name a method, there is already a getter with the same name"); |
| 1135 | 1147 |
| 1136 /** | 1148 /** |
| 1137 * 12.1 Constants: A constant expression is ... a constant list literal. | 1149 * 12.1 Constants: A constant expression is ... a constant list literal. |
| 1138 */ | 1150 */ |
| 1139 static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = const Compil
eTimeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 89, "List literals must be
prefixed with 'const' when used as a constant expression"); | 1151 static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = const Compil
eTimeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 90, "List literals must be
prefixed with 'const' when used as a constant expression"); |
| 1140 | 1152 |
| 1141 /** | 1153 /** |
| 1142 * 12.1 Constants: A constant expression is ... a constant map literal. | 1154 * 12.1 Constants: A constant expression is ... a constant map literal. |
| 1143 */ | 1155 */ |
| 1144 static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = const Compile
TimeErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 90, "Map literals must be pre
fixed with 'const' when used as a constant expression"); | 1156 static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = const Compile
TimeErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 91, "Map literals must be pre
fixed with 'const' when used as a constant expression"); |
| 1145 | 1157 |
| 1146 /** | 1158 /** |
| 1147 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a | 1159 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a |
| 1148 * constructor. | 1160 * constructor. |
| 1149 * | 1161 * |
| 1150 * @param typeName the name of the mixin that is invalid | 1162 * @param typeName the name of the mixin that is invalid |
| 1151 */ | 1163 */ |
| 1152 static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = const CompileTi
meErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 91, "The class '%s' cannot be use
d as a mixin because it declares a constructor"); | 1164 static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = const CompileTi
meErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 92, "The class '%s' cannot be use
d as a mixin because it declares a constructor"); |
| 1153 | 1165 |
| 1154 /** | 1166 /** |
| 1155 * 9.1 Mixin Application: It is a compile-time error if the with clause of a m
ixin application | 1167 * 9.1 Mixin Application: It is a compile-time error if the with clause of a m
ixin application |
| 1156 * <i>C</i> includes a deferred type expression. | 1168 * <i>C</i> includes a deferred type expression. |
| 1157 * | 1169 * |
| 1158 * @param typeName the name of the type that cannot be extended | 1170 * @param typeName the name of the type that cannot be extended |
| 1159 * @see #EXTENDS_DEFERRED_CLASS | 1171 * @see #EXTENDS_DEFERRED_CLASS |
| 1160 * @see #IMPLEMENTS_DEFERRED_CLASS | 1172 * @see #IMPLEMENTS_DEFERRED_CLASS |
| 1161 */ | 1173 */ |
| 1162 static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErro
rCode.con1('MIXIN_DEFERRED_CLASS', 92, "This class cannot mixin the deferred cla
ss '%s'"); | 1174 static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErro
rCode.con1('MIXIN_DEFERRED_CLASS', 93, "This class cannot mixin the deferred cla
ss '%s'"); |
| 1163 | 1175 |
| 1164 /** | 1176 /** |
| 1165 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not | 1177 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not |
| 1166 * Object. | 1178 * Object. |
| 1167 * | 1179 * |
| 1168 * @param typeName the name of the mixin that is invalid | 1180 * @param typeName the name of the mixin that is invalid |
| 1169 */ | 1181 */ |
| 1170 static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = const Compi
leTimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 93, "The class '%s' canno
t be used as a mixin because it extends a class other than Object"); | 1182 static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = const Compi
leTimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 94, "The class '%s' canno
t be used as a mixin because it extends a class other than Object"); |
| 1171 | 1183 |
| 1172 /** | 1184 /** |
| 1173 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1185 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
| 1174 * | 1186 * |
| 1175 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1187 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
| 1176 * | 1188 * |
| 1177 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1189 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
| 1178 * | 1190 * |
| 1179 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1191 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
| 1180 * attempt to extend or implement num. | 1192 * attempt to extend or implement num. |
| 1181 * | 1193 * |
| 1182 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1194 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
| 1183 * | 1195 * |
| 1184 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1196 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
| 1185 * | 1197 * |
| 1186 * @param typeName the name of the type that cannot be extended | 1198 * @param typeName the name of the type that cannot be extended |
| 1187 * @see #IMPLEMENTS_DISALLOWED_CLASS | 1199 * @see #IMPLEMENTS_DISALLOWED_CLASS |
| 1188 */ | 1200 */ |
| 1189 static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = const CompileTim
eErrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 94, "Classes cannot mixin '%s'"); | 1201 static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = const CompileTim
eErrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 95, "Classes cannot mixin '%s'"); |
| 1190 | 1202 |
| 1191 /** | 1203 /** |
| 1192 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin | 1204 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin |
| 1193 * available in the immediately enclosing scope. | 1205 * available in the immediately enclosing scope. |
| 1194 */ | 1206 */ |
| 1195 static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = const CompileTimeErrorC
ode.con1('MIXIN_OF_NON_CLASS', 95, "Classes can only mixin other classes"); | 1207 static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = const CompileTimeErrorC
ode.con1('MIXIN_OF_NON_CLASS', 96, "Classes can only mixin other classes"); |
| 1196 | 1208 |
| 1197 /** | 1209 /** |
| 1198 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. | 1210 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. |
| 1199 */ | 1211 */ |
| 1200 static const CompileTimeErrorCode MIXIN_REFERENCES_SUPER = const CompileTimeEr
rorCode.con1('MIXIN_REFERENCES_SUPER', 96, "The class '%s' cannot be used as a m
ixin because it references 'super'"); | 1212 static const CompileTimeErrorCode MIXIN_REFERENCES_SUPER = const CompileTimeEr
rorCode.con1('MIXIN_REFERENCES_SUPER', 97, "The class '%s' cannot be used as a m
ixin because it references 'super'"); |
| 1201 | 1213 |
| 1202 /** | 1214 /** |
| 1203 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available | 1215 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available |
| 1204 * in the immediately enclosing scope. | 1216 * in the immediately enclosing scope. |
| 1205 */ | 1217 */ |
| 1206 static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = const Comp
ileTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 97, "Mixin can only be
applied to class"); | 1218 static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = const Comp
ileTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 98, "Mixin can only be
applied to class"); |
| 1207 | 1219 |
| 1208 /** | 1220 /** |
| 1209 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1221 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1210 * only action is to invoke another generative constructor. | 1222 * only action is to invoke another generative constructor. |
| 1211 */ | 1223 */ |
| 1212 static const CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= const CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
', 98, "Constructor may have at most one 'this' redirection"); | 1224 static const CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= const CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
', 99, "Constructor may have at most one 'this' redirection"); |
| 1213 | 1225 |
| 1214 /** | 1226 /** |
| 1215 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may | 1227 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may |
| 1216 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. | 1228 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. |
| 1217 */ | 1229 */ |
| 1218 static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = const CompileT
imeErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 99, "Constructor may have at mo
st one 'super' initializer"); | 1230 static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = const CompileT
imeErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 100, "Constructor may have at m
ost one 'super' initializer"); |
| 1219 | 1231 |
| 1220 /** | 1232 /** |
| 1221 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1233 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1222 * character @, followed by a constant expression that must be either a refere
nce to a | 1234 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1223 * compile-time constant variable, or a call to a constant constructor. | 1235 * compile-time constant variable, or a call to a constant constructor. |
| 1224 */ | 1236 */ |
| 1225 static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = const
CompileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 100, "Annotatio
n creation must have arguments"); | 1237 static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = const
CompileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 101, "Annotatio
n creation must have arguments"); |
| 1226 | 1238 |
| 1227 /** | 1239 /** |
| 1228 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer | 1240 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer |
| 1229 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the | 1241 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the |
| 1230 * enclosing class is class <i>Object</i>. | 1242 * enclosing class is class <i>Object</i>. |
| 1231 * | 1243 * |
| 1232 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1244 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1233 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1245 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1234 */ | 1246 */ |
| 1235 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = cons
t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 101, "The c
lass '%s' does not have a default constructor"); | 1247 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = cons
t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 102, "The c
lass '%s' does not have a default constructor"); |
| 1236 | 1248 |
| 1237 /** | 1249 /** |
| 1238 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a | 1250 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a |
| 1239 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. | 1251 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. |
| 1240 * | 1252 * |
| 1241 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1253 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
| 1242 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1254 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
| 1243 */ | 1255 */ |
| 1244 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = cons
t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 102, "The c
lass '%s' does not have a default constructor"); | 1256 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = cons
t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 103, "The c
lass '%s' does not have a default constructor"); |
| 1245 | 1257 |
| 1246 /** | 1258 /** |
| 1247 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has | 1259 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has |
| 1248 * no explicit type arguments appears in a place where a statement is expected
. | 1260 * no explicit type arguments appears in a place where a statement is expected
. |
| 1249 */ | 1261 */ |
| 1250 static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = cons
t CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 103, "A non
-constant map literal without type arguments cannot be used as an expression sta
tement"); | 1262 static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = cons
t CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 104, "A non
-constant map literal without type arguments cannot be used as an expression sta
tement"); |
| 1251 | 1263 |
| 1252 /** | 1264 /** |
| 1253 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 1265 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
| 1254 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 1266 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
| 1255 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form | 1267 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
| 1256 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 1268 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
| 1257 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 1269 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
| 1258 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 1270 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
| 1259 * compile-time constants, for all <i>1 <= k <= n</i>. | 1271 * compile-time constants, for all <i>1 <= k <= n</i>. |
| 1272 * |
| 1273 * TODO (jwren) For this and all other NON_CONSTANT_* error codes we need a co
rresponding |
| 1274 * NON_CONSTANT_*_FROM_DEFERRED_LIBRARY, see NON_CONSTANT_DEFAULT_VALUE_FROM_D
EFERRED_LIBRARY or |
| 1275 * CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY. |
| 1260 */ | 1276 */ |
| 1261 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = const Compile
TimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 104, "Case expressions must b
e constant"); | 1277 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = const Compile
TimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 105, "Case expressions must b
e constant"); |
| 1262 | 1278 |
| 1263 /** | 1279 /** |
| 1264 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 1280 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
| 1265 * parameter is not a compile-time constant. | 1281 * parameter is not a compile-time constant. |
| 1266 */ | 1282 */ |
| 1267 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = const CompileTi
meErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 105, "Default values of an option
al parameter must be constant"); | 1283 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = const CompileTi
meErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 106, "Default values of an option
al parameter must be constant"); |
| 1284 |
| 1285 /** |
| 1286 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
| 1287 * parameter is not a compile-time constant. |
| 1288 * |
| 1289 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
| 1290 * deferred prefix. |
| 1291 */ |
| 1292 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIB
RARY = const CompileTimeErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED
_LIBRARY', 107, "Constant values from a deferred library cannot be used as a def
ault parameter value"); |
| 1268 | 1293 |
| 1269 /** | 1294 /** |
| 1270 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 1295 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
| 1271 * compile-time constant. | 1296 * compile-time constant. |
| 1272 */ | 1297 */ |
| 1273 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = const CompileTim
eErrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 106, "'const' lists must have all c
onstant values"); | 1298 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = const CompileTim
eErrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 108, "'const' lists must have all c
onstant values"); |
| 1274 | 1299 |
| 1275 /** | 1300 /** |
| 1276 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1301 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1277 * literal is not a compile-time constant. | 1302 * literal is not a compile-time constant. |
| 1278 */ | 1303 */ |
| 1279 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = const CompileTimeErro
rCode.con1('NON_CONSTANT_MAP_KEY', 107, "The keys in a map must be constant"); | 1304 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = const CompileTimeErro
rCode.con1('NON_CONSTANT_MAP_KEY', 109, "The keys in a map must be constant"); |
| 1280 | 1305 |
| 1281 /** | 1306 /** |
| 1282 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1307 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
| 1283 * literal is not a compile-time constant. | 1308 * literal is not a compile-time constant. |
| 1284 */ | 1309 */ |
| 1285 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = const CompileTimeEr
rorCode.con1('NON_CONSTANT_MAP_VALUE', 108, "The values in a 'const' map must be
constant"); | 1310 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = const CompileTimeEr
rorCode.con1('NON_CONSTANT_MAP_VALUE', 110, "The values in a 'const' map must be
constant"); |
| 1286 | 1311 |
| 1287 /** | 1312 /** |
| 1288 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1313 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
| 1289 * character @, followed by a constant expression that must be either a refere
nce to a | 1314 * character @, followed by a constant expression that must be either a refere
nce to a |
| 1290 * compile-time constant variable, or a call to a constant constructor. | 1315 * compile-time constant variable, or a call to a constant constructor. |
| 1291 */ | 1316 */ |
| 1292 static const CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = const
CompileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 109, "Annotatio
n creation can use only 'const' constructor"); | 1317 static const CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = const
CompileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 111, "Annotatio
n creation can use only 'const' constructor"); |
| 1293 | 1318 |
| 1294 /** | 1319 /** |
| 1295 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 1320 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
| 1296 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 1321 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
| 1297 */ | 1322 */ |
| 1298 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = const Co
mpileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 110, "Initializer e
xpressions in constant constructors must be constants"); | 1323 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = const Co
mpileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 112, "Initializer e
xpressions in constant constructors must be constants"); |
| 1299 | 1324 |
| 1300 /** | 1325 /** |
| 1301 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 1326 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
| 1302 * | 1327 * |
| 1303 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1328 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1304 * uncaught exception being thrown. | 1329 * uncaught exception being thrown. |
| 1305 * | 1330 * |
| 1306 * @param requiredCount the expected number of required arguments | 1331 * @param requiredCount the expected number of required arguments |
| 1307 * @param argumentCount the actual number of positional arguments given | 1332 * @param argumentCount the actual number of positional arguments given |
| 1308 */ | 1333 */ |
| 1309 static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const Compil
eTimeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 111, "%d required argument(
s) expected, but %d found"); | 1334 static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const Compil
eTimeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 113, "%d required argument(
s) expected, but %d found"); |
| 1310 | 1335 |
| 1311 /** | 1336 /** |
| 1312 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1337 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1313 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1338 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1314 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1339 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1315 * (respectively <i>S.id</i>) | 1340 * (respectively <i>S.id</i>) |
| 1316 */ | 1341 */ |
| 1317 static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = const CompileTi
meErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 112, "The generative constructor
'%s' expected, but factory found"); | 1342 static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = const CompileTi
meErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 114, "The generative constructor
'%s' expected, but factory found"); |
| 1318 | 1343 |
| 1319 /** | 1344 /** |
| 1320 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. | 1345 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. |
| 1321 */ | 1346 */ |
| 1322 static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = const C
ompileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 113, ""); | 1347 static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = const C
ompileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 115, ""); |
| 1323 | 1348 |
| 1324 /** | 1349 /** |
| 1325 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. | 1350 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. |
| 1326 */ | 1351 */ |
| 1327 static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = const Compi
leTimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 114, "Optional parameters
are not allowed when defining an operator"); | 1352 static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = const Compi
leTimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 116, "Optional parameters
are not allowed when defining an operator"); |
| 1328 | 1353 |
| 1329 /** | 1354 /** |
| 1330 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1355 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1331 * declaration. | 1356 * declaration. |
| 1332 * | 1357 * |
| 1333 * @param uri the uri pointing to a non-library declaration | 1358 * @param uri the uri pointing to a non-library declaration |
| 1334 */ | 1359 */ |
| 1335 static const CompileTimeErrorCode PART_OF_NON_PART = const CompileTimeErrorCod
e.con1('PART_OF_NON_PART', 115, "The included part '%s' must have a part-of dire
ctive"); | 1360 static const CompileTimeErrorCode PART_OF_NON_PART = const CompileTimeErrorCod
e.con1('PART_OF_NON_PART', 117, "The included part '%s' must have a part-of dire
ctive"); |
| 1336 | 1361 |
| 1337 /** | 1362 /** |
| 1338 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member | 1363 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member |
| 1339 * named <i>p</i>. | 1364 * named <i>p</i>. |
| 1340 */ | 1365 */ |
| 1341 static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = cons
t CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 116, "The n
ame '%s' is already used as an import prefix and cannot be used to name a top-le
vel element"); | 1366 static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = cons
t CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 118, "The n
ame '%s' is already used as an import prefix and cannot be used to name a top-le
vel element"); |
| 1342 | 1367 |
| 1343 /** | 1368 /** |
| 1344 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter | 1369 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter |
| 1345 * begins with an '_' character. | 1370 * begins with an '_' character. |
| 1346 */ | 1371 */ |
| 1347 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = const CompileTi
meErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 117, "Named optional parameters c
annot start with an underscore"); | 1372 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = const CompileTi
meErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 119, "Named optional parameters c
annot start with an underscore"); |
| 1348 | 1373 |
| 1349 /** | 1374 /** |
| 1350 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression | 1375 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression |
| 1351 * depends on itself. | 1376 * depends on itself. |
| 1352 */ | 1377 */ |
| 1353 static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = const Comp
ileTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 118, ""); | 1378 static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = const Comp
ileTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 120, ""); |
| 1354 | 1379 |
| 1355 /** | 1380 /** |
| 1356 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1381 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1357 * only action is to invoke another generative constructor. | 1382 * only action is to invoke another generative constructor. |
| 1358 * | 1383 * |
| 1359 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in | 1384 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in |
| 1360 * specification. But it was added to the co19 and there is same error for fac
tories. | 1385 * specification. But it was added to the co19 and there is same error for fac
tories. |
| 1361 * | 1386 * |
| 1362 * https://code.google.com/p/dart/issues/detail?id=954 | 1387 * https://code.google.com/p/dart/issues/detail?id=954 |
| 1363 */ | 1388 */ |
| 1364 static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = const Compi
leTimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 119, "Cycle in redirectin
g generative constructors"); | 1389 static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = const Compi
leTimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 121, "Cycle in redirectin
g generative constructors"); |
| 1365 | 1390 |
| 1366 /** | 1391 /** |
| 1367 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to | 1392 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to |
| 1368 * itself, either directly or indirectly via a sequence of redirections. | 1393 * itself, either directly or indirectly via a sequence of redirections. |
| 1369 */ | 1394 */ |
| 1370 static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = const CompileTi
meErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 120, "Cycle in redirecting factor
y constructors"); | 1395 static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = const CompileTi
meErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 122, "Cycle in redirecting factor
y constructors"); |
| 1371 | 1396 |
| 1372 /** | 1397 /** |
| 1373 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1398 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1374 * superinterface of itself. | 1399 * superinterface of itself. |
| 1375 * | 1400 * |
| 1376 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1401 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1377 * | 1402 * |
| 1378 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1403 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1379 * | 1404 * |
| 1380 * @param className the name of the class that implements itself recursively | 1405 * @param className the name of the class that implements itself recursively |
| 1381 * @param strImplementsPath a string representation of the implements loop | 1406 * @param strImplementsPath a string representation of the implements loop |
| 1382 */ | 1407 */ |
| 1383 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = const Comp
ileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 121, "'%s' cannot be a
superinterface of itself: %s"); | 1408 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = const Comp
ileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 123, "'%s' cannot be a
superinterface of itself: %s"); |
| 1384 | 1409 |
| 1385 /** | 1410 /** |
| 1386 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1411 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1387 * superinterface of itself. | 1412 * superinterface of itself. |
| 1388 * | 1413 * |
| 1389 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1414 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1390 * | 1415 * |
| 1391 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1416 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1392 * | 1417 * |
| 1393 * @param className the name of the class that implements itself recursively | 1418 * @param className the name of the class that implements itself recursively |
| 1394 */ | 1419 */ |
| 1395 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CA
SE_EXTENDS', 122, "'%s' cannot extend itself"); | 1420 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CA
SE_EXTENDS', 124, "'%s' cannot extend itself"); |
| 1396 | 1421 |
| 1397 /** | 1422 /** |
| 1398 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1423 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
| 1399 * superinterface of itself. | 1424 * superinterface of itself. |
| 1400 * | 1425 * |
| 1401 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1426 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
| 1402 * | 1427 * |
| 1403 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1428 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
| 1404 * | 1429 * |
| 1405 * @param className the name of the class that implements itself recursively | 1430 * @param className the name of the class that implements itself recursively |
| 1406 */ | 1431 */ |
| 1407 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE
_CASE_IMPLEMENTS', 123, "'%s' cannot implement itself"); | 1432 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE
_CASE_IMPLEMENTS', 125, "'%s' cannot implement itself"); |
| 1408 | 1433 |
| 1409 /** | 1434 /** |
| 1410 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1435 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
| 1411 * <i>k'</i> is not a constant constructor. | 1436 * <i>k'</i> is not a constant constructor. |
| 1412 */ | 1437 */ |
| 1413 static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = const Comp
ileTimeErrorCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 124, "The constructor '
%s' could not be found in '%s'"); | 1438 static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = const Comp
ileTimeErrorCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 126, "The constructor '
%s' could not be found in '%s'"); |
| 1414 | 1439 |
| 1415 /** | 1440 /** |
| 1416 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1441 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
| 1417 * <i>k'</i> is not a constant constructor. | 1442 * <i>k'</i> is not a constant constructor. |
| 1418 */ | 1443 */ |
| 1419 static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS = const CompileTimeErr
orCode.con1('REDIRECT_TO_NON_CLASS', 125, "The name '%s' is not a type and canno
t be used in a redirected constructor"); | 1444 static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS = const CompileTimeErr
orCode.con1('REDIRECT_TO_NON_CLASS', 127, "The name '%s' is not a type and canno
t be used in a redirected constructor"); |
| 1420 | 1445 |
| 1421 /** | 1446 /** |
| 1422 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1447 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
| 1423 * <i>k'</i> is not a constant constructor. | 1448 * <i>k'</i> is not a constant constructor. |
| 1424 */ | 1449 */ |
| 1425 static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = const Co
mpileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 126, "Constant fact
ory constructor cannot delegate to a non-constant constructor"); | 1450 static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = const Co
mpileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 128, "Constant fact
ory constructor cannot delegate to a non-constant constructor"); |
| 1426 | 1451 |
| 1427 /** | 1452 /** |
| 1428 * 5 Variables: A local variable may only be referenced at a source code locat
ion that is after | 1453 * 5 Variables: A local variable may only be referenced at a source code locat
ion that is after |
| 1429 * its initializer, if any, is complete, or a compile-time error occurs. | 1454 * its initializer, if any, is complete, or a compile-time error occurs. |
| 1430 */ | 1455 */ |
| 1431 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = const Compil
eTimeErrorCode.con1('REFERENCED_BEFORE_DECLARATION', 127, "Local variables canno
t be referenced before they are declared"); | 1456 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = const Compil
eTimeErrorCode.con1('REFERENCED_BEFORE_DECLARATION', 129, "Local variables canno
t be referenced before they are declared"); |
| 1432 | 1457 |
| 1433 /** | 1458 /** |
| 1434 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not | 1459 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not |
| 1435 * enclosed within a on-catch clause. | 1460 * enclosed within a on-catch clause. |
| 1436 */ | 1461 */ |
| 1437 static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = const CompileTimeErr
orCode.con1('RETHROW_OUTSIDE_CATCH', 128, "rethrow must be inside of a catch cla
use"); | 1462 static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = const CompileTimeErr
orCode.con1('RETHROW_OUTSIDE_CATCH', 130, "rethrow must be inside of a catch cla
use"); |
| 1438 | 1463 |
| 1439 /** | 1464 /** |
| 1440 * 13.12 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 1465 * 13.12 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
| 1441 * appears in a generative constructor. | 1466 * appears in a generative constructor. |
| 1442 */ | 1467 */ |
| 1443 static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 129, "Constructors ca
nnot return a value"); | 1468 static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 131, "Constructors ca
nnot return a value"); |
| 1444 | 1469 |
| 1445 /** | 1470 /** |
| 1446 * 14.1 Imports: It is a compile-time error if a prefix used in a deferred imp
ort is used in | 1471 * 14.1 Imports: It is a compile-time error if a prefix used in a deferred imp
ort is used in |
| 1447 * another import clause. | 1472 * another import clause. |
| 1448 */ | 1473 */ |
| 1449 static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX = const CompileTimeEr
rorCode.con1('SHARED_DEFERRED_PREFIX', 130, "The prefix of a deferred import can
not be used in other import directives"); | 1474 static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX = const CompileTimeEr
rorCode.con1('SHARED_DEFERRED_PREFIX', 132, "The prefix of a deferred import can
not be used in other import directives"); |
| 1450 | 1475 |
| 1451 /** | 1476 /** |
| 1452 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 1477 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
| 1453 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 1478 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
| 1454 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 1479 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
| 1455 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 1480 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
| 1456 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 1481 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
| 1457 * initializer. | 1482 * initializer. |
| 1458 */ | 1483 */ |
| 1459 static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = const CompileTime
ErrorCode.con1('SUPER_IN_INVALID_CONTEXT', 131, "Invalid context for 'super' inv
ocation"); | 1484 static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = const CompileTime
ErrorCode.con1('SUPER_IN_INVALID_CONTEXT', 133, "Invalid context for 'super' inv
ocation"); |
| 1460 | 1485 |
| 1461 /** | 1486 /** |
| 1462 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1487 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
| 1463 * only action is to invoke another generative constructor. | 1488 * only action is to invoke another generative constructor. |
| 1464 */ | 1489 */ |
| 1465 static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 132, "The redirecting
constructor cannot have a 'super' initializer"); | 1490 static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 134, "The redirecting
constructor cannot have a 'super' initializer"); |
| 1466 | 1491 |
| 1467 /** | 1492 /** |
| 1468 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1493 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
| 1469 * error if a generative constructor of class Object includes a superinitializ
er. | 1494 * error if a generative constructor of class Object includes a superinitializ
er. |
| 1470 */ | 1495 */ |
| 1471 static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = const CompileT
imeErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 133, ""); | 1496 static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = const CompileT
imeErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 135, ""); |
| 1472 | 1497 |
| 1473 /** | 1498 /** |
| 1474 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a | 1499 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a |
| 1475 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object | 1500 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object |
| 1476 * expression are not subtypes of the bounds of the corresponding formal type
parameters of | 1501 * expression are not subtypes of the bounds of the corresponding formal type
parameters of |
| 1477 * <i>G</i>. | 1502 * <i>G</i>. |
| 1478 * | 1503 * |
| 1479 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a | 1504 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a |
| 1480 * dynamic error occurs. | 1505 * dynamic error occurs. |
| 1481 * | 1506 * |
| 1482 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 1507 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
| 1483 * an exception. | 1508 * an exception. |
| 1484 * | 1509 * |
| 1485 * @param boundedTypeName the name of the type used in the instance creation t
hat should be | 1510 * @param boundedTypeName the name of the type used in the instance creation t
hat should be |
| 1486 * limited by the bound as specified in the class declaration | 1511 * limited by the bound as specified in the class declaration |
| 1487 * @param boundingTypeName the name of the bounding type | 1512 * @param boundingTypeName the name of the bounding type |
| 1488 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS | 1513 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS |
| 1489 */ | 1514 */ |
| 1490 static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const Co
mpileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 134, "'%s' does not
extend '%s'"); | 1515 static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const Co
mpileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 136, "'%s' does not
extend '%s'"); |
| 1491 | 1516 |
| 1492 /** | 1517 /** |
| 1493 * 15.3.1 Typedef: Any self reference, either directly, or recursively via ano
ther typedef, is a | 1518 * 15.3.1 Typedef: Any self reference, either directly, or recursively via ano
ther typedef, is a |
| 1494 * compile time error. | 1519 * compile time error. |
| 1495 */ | 1520 */ |
| 1496 static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = const C
ompileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 135, "Type alias
cannot reference itself directly or recursively via another typedef"); | 1521 static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = const C
ompileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 137, "Type alias
cannot reference itself directly or recursively via another typedef"); |
| 1497 | 1522 |
| 1498 /** | 1523 /** |
| 1499 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 1524 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
| 1500 * scope, optionally followed by type arguments. | 1525 * scope, optionally followed by type arguments. |
| 1501 */ | 1526 */ |
| 1502 static const CompileTimeErrorCode UNDEFINED_CLASS = const CompileTimeErrorCode
.con1('UNDEFINED_CLASS', 136, "Undefined class '%s'"); | 1527 static const CompileTimeErrorCode UNDEFINED_CLASS = const CompileTimeErrorCode
.con1('UNDEFINED_CLASS', 138, "Undefined class '%s'"); |
| 1503 | 1528 |
| 1504 /** | 1529 /** |
| 1505 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1530 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1506 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1531 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1507 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1532 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1508 * (respectively <i>S.id</i>) | 1533 * (respectively <i>S.id</i>) |
| 1509 */ | 1534 */ |
| 1510 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = const
CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 137, "The cla
ss '%s' does not have a generative constructor '%s'"); | 1535 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = const
CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 139, "The cla
ss '%s' does not have a generative constructor '%s'"); |
| 1511 | 1536 |
| 1512 /** | 1537 /** |
| 1513 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1538 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
| 1514 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1539 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
| 1515 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1540 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
| 1516 * (respectively <i>S.id</i>) | 1541 * (respectively <i>S.id</i>) |
| 1517 */ | 1542 */ |
| 1518 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= const CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
', 138, "The class '%s' does not have a default generative constructor"); | 1543 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= const CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
', 140, "The class '%s' does not have a default generative constructor"); |
| 1519 | 1544 |
| 1520 /** | 1545 /** |
| 1521 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 1546 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
| 1522 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 1547 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
| 1523 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 1548 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
| 1524 * | 1549 * |
| 1525 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1550 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
| 1526 * uncaught exception being thrown. | 1551 * uncaught exception being thrown. |
| 1527 * | 1552 * |
| 1528 * @param name the name of the requested named parameter | 1553 * @param name the name of the requested named parameter |
| 1529 */ | 1554 */ |
| 1530 static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = const CompileTim
eErrorCode.con1('UNDEFINED_NAMED_PARAMETER', 139, "The named parameter '%s' is n
ot defined"); | 1555 static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = const CompileTim
eErrorCode.con1('UNDEFINED_NAMED_PARAMETER', 141, "The named parameter '%s' is n
ot defined"); |
| 1531 | 1556 |
| 1532 /** | 1557 /** |
| 1533 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1558 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1534 * not a library declaration. | 1559 * not a library declaration. |
| 1535 * | 1560 * |
| 1536 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1561 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
| 1537 * not a library declaration. | 1562 * not a library declaration. |
| 1538 * | 1563 * |
| 1539 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1564 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
| 1540 * declaration. | 1565 * declaration. |
| 1541 * | 1566 * |
| 1542 * @param uri the URI pointing to a non-existent file | 1567 * @param uri the URI pointing to a non-existent file |
| 1543 * @see #INVALID_URI | 1568 * @see #INVALID_URI |
| 1544 */ | 1569 */ |
| 1545 static const CompileTimeErrorCode URI_DOES_NOT_EXIST = const CompileTimeErrorC
ode.con1('URI_DOES_NOT_EXIST', 140, "Target of URI does not exist: '%s'"); | 1570 static const CompileTimeErrorCode URI_DOES_NOT_EXIST = const CompileTimeErrorC
ode.con1('URI_DOES_NOT_EXIST', 142, "Target of URI does not exist: '%s'"); |
| 1546 | 1571 |
| 1547 /** | 1572 /** |
| 1548 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if | 1573 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if |
| 1549 * <i>x</i> involves string interpolation. | 1574 * <i>x</i> involves string interpolation. |
| 1550 * | 1575 * |
| 1551 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if | 1576 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if |
| 1552 * <i>s</i> involves string interpolation. | 1577 * <i>s</i> involves string interpolation. |
| 1553 * | 1578 * |
| 1554 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is | 1579 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is |
| 1555 * not a compile-time constant, or if <i>x</i> involves string interpolation. | 1580 * not a compile-time constant, or if <i>x</i> involves string interpolation. |
| 1556 */ | 1581 */ |
| 1557 static const CompileTimeErrorCode URI_WITH_INTERPOLATION = const CompileTimeEr
rorCode.con1('URI_WITH_INTERPOLATION', 141, "URIs cannot use string interpolatio
n"); | 1582 static const CompileTimeErrorCode URI_WITH_INTERPOLATION = const CompileTimeEr
rorCode.con1('URI_WITH_INTERPOLATION', 143, "URIs cannot use string interpolatio
n"); |
| 1558 | 1583 |
| 1559 /** | 1584 /** |
| 1560 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is | 1585 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is |
| 1561 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the | 1586 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the |
| 1562 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. | 1587 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. |
| 1563 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a | 1588 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a |
| 1564 * compile time error if the arity of the user-declared operator ~ is not 0. | 1589 * compile time error if the arity of the user-declared operator ~ is not 0. |
| 1565 * | 1590 * |
| 1566 * @param operatorName the name of the declared operator | 1591 * @param operatorName the name of the declared operator |
| 1567 * @param expectedNumberOfParameters the number of parameters expected | 1592 * @param expectedNumberOfParameters the number of parameters expected |
| 1568 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1593 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1569 */ | 1594 */ |
| 1570 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = co
nst CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 142, "O
perator '%s' should declare exactly %d parameter(s), but %d found"); | 1595 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = co
nst CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 144, "O
perator '%s' should declare exactly %d parameter(s), but %d found"); |
| 1571 | 1596 |
| 1572 /** | 1597 /** |
| 1573 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not | 1598 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not |
| 1574 * 0 or 1. | 1599 * 0 or 1. |
| 1575 * | 1600 * |
| 1576 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1601 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
| 1577 */ | 1602 */ |
| 1578 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = const CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MIN
US', 143, "Operator '-' should declare 0 or 1 parameter, but %d found"); | 1603 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = const CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MIN
US', 145, "Operator '-' should declare 0 or 1 parameter, but %d found"); |
| 1579 | 1604 |
| 1580 /** | 1605 /** |
| 1581 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include | 1606 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include |
| 1582 * exactly one required formal parameter <i>p</i>. | 1607 * exactly one required formal parameter <i>p</i>. |
| 1583 */ | 1608 */ |
| 1584 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = cons
t CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 144, "Sette
rs should declare exactly one required parameter"); | 1609 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = cons
t CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 146, "Sette
rs should declare exactly one required parameter"); |
| 1585 | 1610 |
| 1586 static const List<CompileTimeErrorCode> values = const [ | 1611 static const List<CompileTimeErrorCode> values = const [ |
| 1587 AMBIGUOUS_EXPORT, | 1612 AMBIGUOUS_EXPORT, |
| 1588 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, | 1613 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, |
| 1589 BUILT_IN_IDENTIFIER_AS_TYPE, | 1614 BUILT_IN_IDENTIFIER_AS_TYPE, |
| 1590 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, | 1615 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, |
| 1591 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, | 1616 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, |
| 1592 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, | 1617 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, |
| 1593 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | 1618 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
| 1594 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, | 1619 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, |
| 1595 CONFLICTING_GETTER_AND_METHOD, | 1620 CONFLICTING_GETTER_AND_METHOD, |
| 1596 CONFLICTING_METHOD_AND_GETTER, | 1621 CONFLICTING_METHOD_AND_GETTER, |
| 1597 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, | 1622 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, |
| 1598 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, | 1623 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, |
| 1599 CONFLICTING_TYPE_VARIABLE_AND_CLASS, | 1624 CONFLICTING_TYPE_VARIABLE_AND_CLASS, |
| 1600 CONFLICTING_TYPE_VARIABLE_AND_MEMBER, | 1625 CONFLICTING_TYPE_VARIABLE_AND_MEMBER, |
| 1601 CONST_CONSTRUCTOR_THROWS_EXCEPTION, | 1626 CONST_CONSTRUCTOR_THROWS_EXCEPTION, |
| 1602 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, | 1627 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, |
| 1603 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, | 1628 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, |
| 1604 CONST_DEFERRED_CLASS, | 1629 CONST_DEFERRED_CLASS, |
| 1605 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, | 1630 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, |
| 1606 CONST_FORMAL_PARAMETER, | 1631 CONST_FORMAL_PARAMETER, |
| 1607 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, | 1632 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, |
| 1633 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY, |
| 1608 CONST_INSTANCE_FIELD, | 1634 CONST_INSTANCE_FIELD, |
| 1609 CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | 1635 CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
| 1610 CONST_NOT_INITIALIZED, | 1636 CONST_NOT_INITIALIZED, |
| 1611 CONST_EVAL_TYPE_BOOL, | 1637 CONST_EVAL_TYPE_BOOL, |
| 1612 CONST_EVAL_TYPE_BOOL_NUM_STRING, | 1638 CONST_EVAL_TYPE_BOOL_NUM_STRING, |
| 1613 CONST_EVAL_TYPE_INT, | 1639 CONST_EVAL_TYPE_INT, |
| 1614 CONST_EVAL_TYPE_NUM, | 1640 CONST_EVAL_TYPE_NUM, |
| 1615 CONST_EVAL_THROWS_EXCEPTION, | 1641 CONST_EVAL_THROWS_EXCEPTION, |
| 1616 CONST_EVAL_THROWS_IDBZE, | 1642 CONST_EVAL_THROWS_IDBZE, |
| 1617 CONST_WITH_INVALID_TYPE_PARAMETERS, | 1643 CONST_WITH_INVALID_TYPE_PARAMETERS, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1642 FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, | 1668 FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, |
| 1643 FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, | 1669 FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, |
| 1644 GETTER_AND_METHOD_WITH_SAME_NAME, | 1670 GETTER_AND_METHOD_WITH_SAME_NAME, |
| 1645 IMPLEMENTS_DEFERRED_CLASS, | 1671 IMPLEMENTS_DEFERRED_CLASS, |
| 1646 IMPLEMENTS_DISALLOWED_CLASS, | 1672 IMPLEMENTS_DISALLOWED_CLASS, |
| 1647 IMPLEMENTS_DYNAMIC, | 1673 IMPLEMENTS_DYNAMIC, |
| 1648 IMPLEMENTS_NON_CLASS, | 1674 IMPLEMENTS_NON_CLASS, |
| 1649 IMPLEMENTS_REPEATED, | 1675 IMPLEMENTS_REPEATED, |
| 1650 IMPLEMENTS_SUPER_CLASS, | 1676 IMPLEMENTS_SUPER_CLASS, |
| 1651 IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, | 1677 IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, |
| 1652 IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION, | |
| 1653 IMPORT_INTERNAL_LIBRARY, | 1678 IMPORT_INTERNAL_LIBRARY, |
| 1654 IMPORT_OF_NON_LIBRARY, | 1679 IMPORT_OF_NON_LIBRARY, |
| 1655 INCONSISTENT_CASE_EXPRESSION_TYPES, | 1680 INCONSISTENT_CASE_EXPRESSION_TYPES, |
| 1656 INITIALIZER_FOR_NON_EXISTANT_FIELD, | 1681 INITIALIZER_FOR_NON_EXISTANT_FIELD, |
| 1657 INITIALIZER_FOR_STATIC_FIELD, | 1682 INITIALIZER_FOR_STATIC_FIELD, |
| 1658 INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, | 1683 INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, |
| 1659 INITIALIZING_FORMAL_FOR_STATIC_FIELD, | 1684 INITIALIZING_FORMAL_FOR_STATIC_FIELD, |
| 1660 INSTANCE_MEMBER_ACCESS_FROM_STATIC, | 1685 INSTANCE_MEMBER_ACCESS_FROM_STATIC, |
| 1661 INVALID_ANNOTATION, | 1686 INVALID_ANNOTATION, |
| 1687 INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY, |
| 1662 INVALID_CONSTANT, | 1688 INVALID_CONSTANT, |
| 1663 INVALID_CONSTRUCTOR_NAME, | 1689 INVALID_CONSTRUCTOR_NAME, |
| 1664 INVALID_FACTORY_NAME_NOT_A_CLASS, | 1690 INVALID_FACTORY_NAME_NOT_A_CLASS, |
| 1665 INVALID_REFERENCE_TO_THIS, | 1691 INVALID_REFERENCE_TO_THIS, |
| 1666 INVALID_TYPE_ARGUMENT_IN_CONST_LIST, | 1692 INVALID_TYPE_ARGUMENT_IN_CONST_LIST, |
| 1667 INVALID_TYPE_ARGUMENT_IN_CONST_MAP, | 1693 INVALID_TYPE_ARGUMENT_IN_CONST_MAP, |
| 1668 INVALID_URI, | 1694 INVALID_URI, |
| 1669 LABEL_IN_OUTER_SCOPE, | 1695 LABEL_IN_OUTER_SCOPE, |
| 1670 LABEL_UNDEFINED, | 1696 LABEL_UNDEFINED, |
| 1671 LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, | 1697 LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1683 MIXIN_REFERENCES_SUPER, | 1709 MIXIN_REFERENCES_SUPER, |
| 1684 MIXIN_WITH_NON_CLASS_SUPERCLASS, | 1710 MIXIN_WITH_NON_CLASS_SUPERCLASS, |
| 1685 MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS, | 1711 MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS, |
| 1686 MULTIPLE_SUPER_INITIALIZERS, | 1712 MULTIPLE_SUPER_INITIALIZERS, |
| 1687 NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, | 1713 NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, |
| 1688 NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, | 1714 NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, |
| 1689 NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, | 1715 NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, |
| 1690 NON_CONST_MAP_AS_EXPRESSION_STATEMENT, | 1716 NON_CONST_MAP_AS_EXPRESSION_STATEMENT, |
| 1691 NON_CONSTANT_CASE_EXPRESSION, | 1717 NON_CONSTANT_CASE_EXPRESSION, |
| 1692 NON_CONSTANT_DEFAULT_VALUE, | 1718 NON_CONSTANT_DEFAULT_VALUE, |
| 1719 NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY, |
| 1693 NON_CONSTANT_LIST_ELEMENT, | 1720 NON_CONSTANT_LIST_ELEMENT, |
| 1694 NON_CONSTANT_MAP_KEY, | 1721 NON_CONSTANT_MAP_KEY, |
| 1695 NON_CONSTANT_MAP_VALUE, | 1722 NON_CONSTANT_MAP_VALUE, |
| 1696 NON_CONSTANT_ANNOTATION_CONSTRUCTOR, | 1723 NON_CONSTANT_ANNOTATION_CONSTRUCTOR, |
| 1697 NON_CONSTANT_VALUE_IN_INITIALIZER, | 1724 NON_CONSTANT_VALUE_IN_INITIALIZER, |
| 1698 NOT_ENOUGH_REQUIRED_ARGUMENTS, | 1725 NOT_ENOUGH_REQUIRED_ARGUMENTS, |
| 1699 NON_GENERATIVE_CONSTRUCTOR, | 1726 NON_GENERATIVE_CONSTRUCTOR, |
| 1700 OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, | 1727 OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, |
| 1701 OPTIONAL_PARAMETER_IN_OPERATOR, | 1728 OPTIONAL_PARAMETER_IN_OPERATOR, |
| 1702 PART_OF_NON_PART, | 1729 PART_OF_NON_PART, |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 * Hint for the `x is! double` type checks. | 2160 * Hint for the `x is! double` type checks. |
| 2134 */ | 2161 */ |
| 2135 static const HintCode IS_NOT_DOUBLE = const HintCode.con1('IS_NOT_DOUBLE', 9,
"When compiled to JS, this test might return false when the left hand side is an
int"); | 2162 static const HintCode IS_NOT_DOUBLE = const HintCode.con1('IS_NOT_DOUBLE', 9,
"When compiled to JS, this test might return false when the left hand side is an
int"); |
| 2136 | 2163 |
| 2137 /** | 2164 /** |
| 2138 * Hint for the `x is! int` type checks. | 2165 * Hint for the `x is! int` type checks. |
| 2139 */ | 2166 */ |
| 2140 static const HintCode IS_NOT_INT = const HintCode.con1('IS_NOT_INT', 10, "When
compiled to JS, this test might return false when the left hand side is a doubl
e"); | 2167 static const HintCode IS_NOT_INT = const HintCode.con1('IS_NOT_INT', 10, "When
compiled to JS, this test might return false when the left hand side is a doubl
e"); |
| 2141 | 2168 |
| 2142 /** | 2169 /** |
| 2170 * Deferred libraries shouldn't define a top level function 'loadLibrary'. |
| 2171 */ |
| 2172 static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION = const HintC
ode.con1('IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION', 11, "The library '%s' def
ines a top-level function named 'loadLibrary' which is hidden by deferring this
library"); |
| 2173 |
| 2174 /** |
| 2143 * This hint is generated anywhere where the [StaticTypeWarningCode#INVALID_AS
SIGNMENT] | 2175 * This hint is generated anywhere where the [StaticTypeWarningCode#INVALID_AS
SIGNMENT] |
| 2144 * would have been generated, if we used propagated information for the warnin
gs. | 2176 * would have been generated, if we used propagated information for the warnin
gs. |
| 2145 * | 2177 * |
| 2146 * @param rhsTypeName the name of the right hand side type | 2178 * @param rhsTypeName the name of the right hand side type |
| 2147 * @param lhsTypeName the name of the left hand side type | 2179 * @param lhsTypeName the name of the left hand side type |
| 2148 * @see StaticTypeWarningCode#INVALID_ASSIGNMENT | 2180 * @see StaticTypeWarningCode#INVALID_ASSIGNMENT |
| 2149 */ | 2181 */ |
| 2150 static const HintCode INVALID_ASSIGNMENT = const HintCode.con1('INVALID_ASSIGN
MENT', 11, "A value of type '%s' cannot be assigned to a variable of type '%s'")
; | 2182 static const HintCode INVALID_ASSIGNMENT = const HintCode.con1('INVALID_ASSIGN
MENT', 12, "A value of type '%s' cannot be assigned to a variable of type '%s'")
; |
| 2151 | 2183 |
| 2152 /** | 2184 /** |
| 2153 * Generate a hint for methods or functions that have a return type, but do no
t have a non-void | 2185 * Generate a hint for methods or functions that have a return type, but do no
t have a non-void |
| 2154 * return statement on all branches. At the end of methods or functions with n
o return, Dart | 2186 * return statement on all branches. At the end of methods or functions with n
o return, Dart |
| 2155 * implicitly returns `null`, avoiding these implicit returns is considered a
best practice. | 2187 * implicitly returns `null`, avoiding these implicit returns is considered a
best practice. |
| 2156 * | 2188 * |
| 2157 * @param returnType the name of the declared return type | 2189 * @param returnType the name of the declared return type |
| 2158 */ | 2190 */ |
| 2159 static const HintCode MISSING_RETURN = const HintCode.con2('MISSING_RETURN', 1
2, "This function declares a return type of '%s', but does not end with a return
statement", "Either add a return statement or change the return type to 'void'"
); | 2191 static const HintCode MISSING_RETURN = const HintCode.con2('MISSING_RETURN', 1
3, "This function declares a return type of '%s', but does not end with a return
statement", "Either add a return statement or change the return type to 'void'"
); |
| 2160 | 2192 |
| 2161 /** | 2193 /** |
| 2162 * A getter with the override annotation does not override an existing getter. | 2194 * A getter with the override annotation does not override an existing getter. |
| 2163 */ | 2195 */ |
| 2164 static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = const HintCode.con1(
'OVERRIDE_ON_NON_OVERRIDING_GETTER', 13, "Getter does not override an inherited
getter"); | 2196 static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = const HintCode.con1(
'OVERRIDE_ON_NON_OVERRIDING_GETTER', 14, "Getter does not override an inherited
getter"); |
| 2165 | 2197 |
| 2166 /** | 2198 /** |
| 2167 * A method with the override annotation does not override an existing method. | 2199 * A method with the override annotation does not override an existing method. |
| 2168 */ | 2200 */ |
| 2169 static const HintCode OVERRIDE_ON_NON_OVERRIDING_METHOD = const HintCode.con1(
'OVERRIDE_ON_NON_OVERRIDING_METHOD', 14, "Method does not override an inherited
method"); | 2201 static const HintCode OVERRIDE_ON_NON_OVERRIDING_METHOD = const HintCode.con1(
'OVERRIDE_ON_NON_OVERRIDING_METHOD', 15, "Method does not override an inherited
method"); |
| 2170 | 2202 |
| 2171 /** | 2203 /** |
| 2172 * A setter with the override annotation does not override an existing setter. | 2204 * A setter with the override annotation does not override an existing setter. |
| 2173 */ | 2205 */ |
| 2174 static const HintCode OVERRIDE_ON_NON_OVERRIDING_SETTER = const HintCode.con1(
'OVERRIDE_ON_NON_OVERRIDING_SETTER', 15, "Setter does not override an inherited
setter"); | 2206 static const HintCode OVERRIDE_ON_NON_OVERRIDING_SETTER = const HintCode.con1(
'OVERRIDE_ON_NON_OVERRIDING_SETTER', 16, "Setter does not override an inherited
setter"); |
| 2175 | 2207 |
| 2176 /** | 2208 /** |
| 2177 * Hint for classes that override equals, but not hashCode. | 2209 * Hint for classes that override equals, but not hashCode. |
| 2178 * | 2210 * |
| 2179 * @param className the name of the current class | 2211 * @param className the name of the current class |
| 2180 */ | 2212 */ |
| 2181 static const HintCode OVERRIDE_EQUALS_BUT_NOT_HASH_CODE = const HintCode.con1(
'OVERRIDE_EQUALS_BUT_NOT_HASH_CODE', 16, "The class '%s' overrides 'operator==',
but not 'get hashCode'"); | 2213 static const HintCode OVERRIDE_EQUALS_BUT_NOT_HASH_CODE = const HintCode.con1(
'OVERRIDE_EQUALS_BUT_NOT_HASH_CODE', 17, "The class '%s' overrides 'operator==',
but not 'get hashCode'"); |
| 2182 | 2214 |
| 2183 /** | 2215 /** |
| 2184 * Type checks of the type `x is! Null` should be done with `x != null`. | 2216 * Type checks of the type `x is! Null` should be done with `x != null`. |
| 2185 */ | 2217 */ |
| 2186 static const HintCode TYPE_CHECK_IS_NOT_NULL = const HintCode.con1('TYPE_CHECK
_IS_NOT_NULL', 17, "Tests for non-null should be done with '!= null'"); | 2218 static const HintCode TYPE_CHECK_IS_NOT_NULL = const HintCode.con1('TYPE_CHECK
_IS_NOT_NULL', 18, "Tests for non-null should be done with '!= null'"); |
| 2187 | 2219 |
| 2188 /** | 2220 /** |
| 2189 * Type checks of the type `x is Null` should be done with `x == null`. | 2221 * Type checks of the type `x is Null` should be done with `x == null`. |
| 2190 */ | 2222 */ |
| 2191 static const HintCode TYPE_CHECK_IS_NULL = const HintCode.con1('TYPE_CHECK_IS_
NULL', 18, "Tests for null should be done with '== null'"); | 2223 static const HintCode TYPE_CHECK_IS_NULL = const HintCode.con1('TYPE_CHECK_IS_
NULL', 19, "Tests for null should be done with '== null'"); |
| 2192 | 2224 |
| 2193 /** | 2225 /** |
| 2194 * This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_
GETTER] or | 2226 * This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_
GETTER] or |
| 2195 * [StaticWarningCode#UNDEFINED_GETTER] would have been generated, if we used
propagated | 2227 * [StaticWarningCode#UNDEFINED_GETTER] would have been generated, if we used
propagated |
| 2196 * information for the warnings. | 2228 * information for the warnings. |
| 2197 * | 2229 * |
| 2198 * @param getterName the name of the getter | 2230 * @param getterName the name of the getter |
| 2199 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for | 2231 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for |
| 2200 * @see StaticTypeWarningCode#UNDEFINED_GETTER | 2232 * @see StaticTypeWarningCode#UNDEFINED_GETTER |
| 2201 * @see StaticWarningCode#UNDEFINED_GETTER | 2233 * @see StaticWarningCode#UNDEFINED_GETTER |
| 2202 */ | 2234 */ |
| 2203 static const HintCode UNDEFINED_GETTER = const HintCode.con1('UNDEFINED_GETTER
', 19, "There is no such getter '%s' in '%s'"); | 2235 static const HintCode UNDEFINED_GETTER = const HintCode.con1('UNDEFINED_GETTER
', 20, "There is no such getter '%s' in '%s'"); |
| 2204 | 2236 |
| 2205 /** | 2237 /** |
| 2206 * This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_
METHOD] would | 2238 * This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_
METHOD] would |
| 2207 * have been generated, if we used propagated information for the warnings. | 2239 * have been generated, if we used propagated information for the warnings. |
| 2208 * | 2240 * |
| 2209 * @param methodName the name of the method that is undefined | 2241 * @param methodName the name of the method that is undefined |
| 2210 * @param typeName the resolved type name that the method lookup is happening
on | 2242 * @param typeName the resolved type name that the method lookup is happening
on |
| 2211 * @see StaticTypeWarningCode#UNDEFINED_METHOD | 2243 * @see StaticTypeWarningCode#UNDEFINED_METHOD |
| 2212 */ | 2244 */ |
| 2213 static const HintCode UNDEFINED_METHOD = const HintCode.con1('UNDEFINED_METHOD
', 20, "The method '%s' is not defined for the class '%s'"); | 2245 static const HintCode UNDEFINED_METHOD = const HintCode.con1('UNDEFINED_METHOD
', 21, "The method '%s' is not defined for the class '%s'"); |
| 2214 | 2246 |
| 2215 /** | 2247 /** |
| 2216 * This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_
OPERATOR] | 2248 * This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_
OPERATOR] |
| 2217 * would have been generated, if we used propagated information for the warnin
gs. | 2249 * would have been generated, if we used propagated information for the warnin
gs. |
| 2218 * | 2250 * |
| 2219 * @param operator the name of the operator | 2251 * @param operator the name of the operator |
| 2220 * @param enclosingType the name of the enclosing type where the operator is b
eing looked for | 2252 * @param enclosingType the name of the enclosing type where the operator is b
eing looked for |
| 2221 * @see StaticTypeWarningCode#UNDEFINED_OPERATOR | 2253 * @see StaticTypeWarningCode#UNDEFINED_OPERATOR |
| 2222 */ | 2254 */ |
| 2223 static const HintCode UNDEFINED_OPERATOR = const HintCode.con1('UNDEFINED_OPER
ATOR', 21, "There is no such operator '%s' in '%s'"); | 2255 static const HintCode UNDEFINED_OPERATOR = const HintCode.con1('UNDEFINED_OPER
ATOR', 22, "There is no such operator '%s' in '%s'"); |
| 2224 | 2256 |
| 2225 /** | 2257 /** |
| 2226 * This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_
SETTER] or | 2258 * This hint is generated anywhere where the [StaticTypeWarningCode#UNDEFINED_
SETTER] or |
| 2227 * [StaticWarningCode#UNDEFINED_SETTER] would have been generated, if we used
propagated | 2259 * [StaticWarningCode#UNDEFINED_SETTER] would have been generated, if we used
propagated |
| 2228 * information for the warnings. | 2260 * information for the warnings. |
| 2229 * | 2261 * |
| 2230 * @param setterName the name of the setter | 2262 * @param setterName the name of the setter |
| 2231 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for | 2263 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for |
| 2232 * @see StaticTypeWarningCode#UNDEFINED_SETTER | 2264 * @see StaticTypeWarningCode#UNDEFINED_SETTER |
| 2233 * @see StaticWarningCode#UNDEFINED_SETTER | 2265 * @see StaticWarningCode#UNDEFINED_SETTER |
| 2234 */ | 2266 */ |
| 2235 static const HintCode UNDEFINED_SETTER = const HintCode.con1('UNDEFINED_SETTER
', 22, "There is no such setter '%s' in '%s'"); | 2267 static const HintCode UNDEFINED_SETTER = const HintCode.con1('UNDEFINED_SETTER
', 23, "There is no such setter '%s' in '%s'"); |
| 2236 | 2268 |
| 2237 /** | 2269 /** |
| 2238 * Unnecessary cast. | 2270 * Unnecessary cast. |
| 2239 */ | 2271 */ |
| 2240 static const HintCode UNNECESSARY_CAST = const HintCode.con1('UNNECESSARY_CAST
', 23, "Unnecessary cast"); | 2272 static const HintCode UNNECESSARY_CAST = const HintCode.con1('UNNECESSARY_CAST
', 24, "Unnecessary cast"); |
| 2241 | 2273 |
| 2242 /** | 2274 /** |
| 2243 * Unnecessary type checks, the result is always true. | 2275 * Unnecessary type checks, the result is always true. |
| 2244 */ | 2276 */ |
| 2245 static const HintCode UNNECESSARY_TYPE_CHECK_FALSE = const HintCode.con1('UNNE
CESSARY_TYPE_CHECK_FALSE', 24, "Unnecessary type check, the result is always fal
se"); | 2277 static const HintCode UNNECESSARY_TYPE_CHECK_FALSE = const HintCode.con1('UNNE
CESSARY_TYPE_CHECK_FALSE', 25, "Unnecessary type check, the result is always fal
se"); |
| 2246 | 2278 |
| 2247 /** | 2279 /** |
| 2248 * Unnecessary type checks, the result is always false. | 2280 * Unnecessary type checks, the result is always false. |
| 2249 */ | 2281 */ |
| 2250 static const HintCode UNNECESSARY_TYPE_CHECK_TRUE = const HintCode.con1('UNNEC
ESSARY_TYPE_CHECK_TRUE', 25, "Unnecessary type check, the result is always true"
); | 2282 static const HintCode UNNECESSARY_TYPE_CHECK_TRUE = const HintCode.con1('UNNEC
ESSARY_TYPE_CHECK_TRUE', 26, "Unnecessary type check, the result is always true"
); |
| 2251 | 2283 |
| 2252 /** | 2284 /** |
| 2253 * Unused imports are imports which are never not used. | 2285 * Unused imports are imports which are never not used. |
| 2254 */ | 2286 */ |
| 2255 static const HintCode UNUSED_IMPORT = const HintCode.con1('UNUSED_IMPORT', 26,
"Unused import"); | 2287 static const HintCode UNUSED_IMPORT = const HintCode.con1('UNUSED_IMPORT', 27,
"Unused import"); |
| 2256 | 2288 |
| 2257 /** | 2289 /** |
| 2258 * Hint for cases where the source expects a method or function to return a no
n-void result, but | 2290 * Hint for cases where the source expects a method or function to return a no
n-void result, but |
| 2259 * the method or function signature returns void. | 2291 * the method or function signature returns void. |
| 2260 * | 2292 * |
| 2261 * @param name the name of the method or function that returns void | 2293 * @param name the name of the method or function that returns void |
| 2262 */ | 2294 */ |
| 2263 static const HintCode USE_OF_VOID_RESULT = const HintCode.con1('USE_OF_VOID_RE
SULT', 27, "The result of '%s' is being used, even though it is declared to be '
void'"); | 2295 static const HintCode USE_OF_VOID_RESULT = const HintCode.con1('USE_OF_VOID_RE
SULT', 28, "The result of '%s' is being used, even though it is declared to be '
void'"); |
| 2264 | 2296 |
| 2265 static const List<HintCode> values = const [ | 2297 static const List<HintCode> values = const [ |
| 2266 ARGUMENT_TYPE_NOT_ASSIGNABLE, | 2298 ARGUMENT_TYPE_NOT_ASSIGNABLE, |
| 2267 DEAD_CODE, | 2299 DEAD_CODE, |
| 2268 DEAD_CODE_CATCH_FOLLOWING_CATCH, | 2300 DEAD_CODE_CATCH_FOLLOWING_CATCH, |
| 2269 DEAD_CODE_ON_CATCH_SUBTYPE, | 2301 DEAD_CODE_ON_CATCH_SUBTYPE, |
| 2270 DEPRECATED_MEMBER_USE, | 2302 DEPRECATED_MEMBER_USE, |
| 2271 DUPLICATE_IMPORT, | 2303 DUPLICATE_IMPORT, |
| 2272 DIVISION_OPTIMIZATION, | 2304 DIVISION_OPTIMIZATION, |
| 2273 IS_DOUBLE, | 2305 IS_DOUBLE, |
| 2274 IS_INT, | 2306 IS_INT, |
| 2275 IS_NOT_DOUBLE, | 2307 IS_NOT_DOUBLE, |
| 2276 IS_NOT_INT, | 2308 IS_NOT_INT, |
| 2309 IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION, |
| 2277 INVALID_ASSIGNMENT, | 2310 INVALID_ASSIGNMENT, |
| 2278 MISSING_RETURN, | 2311 MISSING_RETURN, |
| 2279 OVERRIDE_ON_NON_OVERRIDING_GETTER, | 2312 OVERRIDE_ON_NON_OVERRIDING_GETTER, |
| 2280 OVERRIDE_ON_NON_OVERRIDING_METHOD, | 2313 OVERRIDE_ON_NON_OVERRIDING_METHOD, |
| 2281 OVERRIDE_ON_NON_OVERRIDING_SETTER, | 2314 OVERRIDE_ON_NON_OVERRIDING_SETTER, |
| 2282 OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, | 2315 OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, |
| 2283 TYPE_CHECK_IS_NOT_NULL, | 2316 TYPE_CHECK_IS_NOT_NULL, |
| 2284 TYPE_CHECK_IS_NULL, | 2317 TYPE_CHECK_IS_NULL, |
| 2285 UNDEFINED_GETTER, | 2318 UNDEFINED_GETTER, |
| 2286 UNDEFINED_METHOD, | 2319 UNDEFINED_METHOD, |
| (...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3781 | 3814 |
| 3782 @override | 3815 @override |
| 3783 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 3816 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 3784 | 3817 |
| 3785 @override | 3818 @override |
| 3786 String get message => "%s"; | 3819 String get message => "%s"; |
| 3787 | 3820 |
| 3788 @override | 3821 @override |
| 3789 ErrorType get type => ErrorType.TODO; | 3822 ErrorType get type => ErrorType.TODO; |
| 3790 } | 3823 } |
| OLD | NEW |