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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 /** | 485 /** |
486 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 486 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
487 * uncaught exception being thrown. | 487 * uncaught exception being thrown. |
488 */ | 488 */ |
489 static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = const C
ompileTimeErrorCode.con1('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 14, "'const' cons
tructors cannot throw exceptions"); | 489 static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = const C
ompileTimeErrorCode.con1('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 14, "'const' cons
tructors cannot throw exceptions"); |
490 | 490 |
491 /** | 491 /** |
492 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
or implicitly, in | 492 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
or implicitly, in |
493 * the initializer list of a constant constructor must specify a constant cons
tructor of the | 493 * the initializer list of a constant constructor must specify a constant cons
tructor of the |
494 * superclass of the immediately enclosing class or a compile-time error occur
s. | 494 * superclass of the immediately enclosing class or a compile-time error occur
s. |
| 495 * |
| 496 * 9 Mixins: For each generative constructor named ... an implicitly declared
constructor named |
| 497 * ... is declared. |
| 498 */ |
| 499 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN = const Compile
TimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_MIXIN', 15, "Constant constructor can
not be declared for a class with a mixin"); |
| 500 |
| 501 /** |
| 502 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
or implicitly, in |
| 503 * the initializer list of a constant constructor must specify a constant cons
tructor of the |
| 504 * superclass of the immediately enclosing class or a compile-time error occur
s. |
495 */ | 505 */ |
496 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = con
st CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 15, "Cons
tant constructor cannot call non-constant super constructor"); | 506 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = con
st CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 16, "Cons
tant constructor cannot call non-constant super constructor of '%s'"); |
497 | 507 |
498 /** | 508 /** |
499 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared | 509 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const
ructor is declared |
500 * by a class that has a non-final instance variable. | 510 * by a class that has a non-final instance variable. |
501 * | 511 * |
502 * The above refers to both locally declared and inherited instance variables. | 512 * The above refers to both locally declared and inherited instance variables. |
503 */ | 513 */ |
504 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = con
st CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 16, "Cann
ot define the 'const' constructor for a class with non-final fields"); | 514 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = con
st CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 17, "Cann
ot define the 'const' constructor for a class with non-final fields"); |
505 | 515 |
506 /** | 516 /** |
507 * 12.12.2 Const: It is a compile-time error if <i>T</i> is a deferred type. | 517 * 12.12.2 Const: It is a compile-time error if <i>T</i> is a deferred type. |
508 */ | 518 */ |
509 static const CompileTimeErrorCode CONST_DEFERRED_CLASS = const CompileTimeErro
rCode.con1('CONST_DEFERRED_CLASS', 17, "Deferred classes cannot be created with
'const'"); | 519 static const CompileTimeErrorCode CONST_DEFERRED_CLASS = const CompileTimeErro
rCode.con1('CONST_DEFERRED_CLASS', 18, "Deferred classes cannot be created with
'const'"); |
510 | 520 |
511 /** | 521 /** |
512 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not | 522 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
if o is not |
513 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of | 523 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of
the static type of |
514 * the field <i>v</i>. | 524 * the field <i>v</i>. |
515 * | 525 * |
516 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 526 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
517 * uncaught exception being thrown. | 527 * uncaught exception being thrown. |
518 * | 528 * |
519 * @param initializerType the name of the type of the initializer expression | 529 * @param initializerType the name of the type of the initializer expression |
520 * @param fieldType the name of the type of the field | 530 * @param fieldType the name of the type of the field |
521 */ | 531 */ |
522 static const CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = con
st CompileTimeErrorCode.con1('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 18, "The
initializer type '%s' cannot be assigned to the field type '%s'"); | 532 static const CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = con
st CompileTimeErrorCode.con1('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 19, "The
initializer type '%s' cannot be assigned to the field type '%s'"); |
523 | 533 |
524 /** | 534 /** |
525 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a | 535 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
declared as a |
526 * constant variable. | 536 * constant variable. |
527 */ | 537 */ |
528 static const CompileTimeErrorCode CONST_FORMAL_PARAMETER = const CompileTimeEr
rorCode.con1('CONST_FORMAL_PARAMETER', 19, "Parameters cannot be 'const'"); | 538 static const CompileTimeErrorCode CONST_FORMAL_PARAMETER = const CompileTimeEr
rorCode.con1('CONST_FORMAL_PARAMETER', 20, "Parameters cannot be 'const'"); |
529 | 539 |
530 /** | 540 /** |
531 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a | 541 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
532 * compile-time error occurs. | 542 * compile-time error occurs. |
533 */ | 543 */ |
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"); | 544 static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
const CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 21,
"'const' variables must be constant value"); |
535 | 545 |
536 /** | 546 /** |
537 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a | 547 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant or a |
538 * compile-time error occurs. | 548 * compile-time error occurs. |
539 * | 549 * |
540 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a | 550 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
541 * deferred prefix. | 551 * deferred prefix. |
542 */ | 552 */ |
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"); | 553 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', 22, "Constant values from a deferred li
brary cannot be used to initialized a 'const' variable"); |
544 | 554 |
545 /** | 555 /** |
546 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be | 556 * 7.5 Instance Variables: It is a compile-time error if an instance variable
is declared to be |
547 * constant. | 557 * constant. |
548 */ | 558 */ |
549 static const CompileTimeErrorCode CONST_INSTANCE_FIELD = const CompileTimeErro
rCode.con1('CONST_INSTANCE_FIELD', 22, "Only static fields can be declared as 'c
onst'"); | 559 static const CompileTimeErrorCode CONST_INSTANCE_FIELD = const CompileTimeErro
rCode.con1('CONST_INSTANCE_FIELD', 23, "Only static fields can be declared as 'c
onst'"); |
550 | 560 |
551 /** | 561 /** |
552 * 12.8 Maps: It is a compile-time error if the key of an entry in a constant
map literal is an | 562 * 12.8 Maps: It is a compile-time error if the key of an entry in a constant
map literal is an |
553 * instance of a class that implements the operator <i>==</i> unless the key i
s a string or | 563 * instance of a class that implements the operator <i>==</i> unless the key i
s a string or |
554 * integer. | 564 * integer. |
555 */ | 565 */ |
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"); | 566 static const CompileTimeErrorCode CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQU
ALS = const CompileTimeErrorCode.con1('CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_
EQUALS', 24, "The constant map entry key expression type '%s' cannot override th
e == operator"); |
557 | 567 |
558 /** | 568 /** |
559 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant (12.1) or a | 569 * 5 Variables: A constant variable must be initialized to a compile-time cons
tant (12.1) or a |
560 * compile-time error occurs. | 570 * compile-time error occurs. |
561 * | 571 * |
562 * @param name the name of the uninitialized final variable | 572 * @param name the name of the uninitialized final variable |
563 */ | 573 */ |
564 static const CompileTimeErrorCode CONST_NOT_INITIALIZED = const CompileTimeErr
orCode.con1('CONST_NOT_INITIALIZED', 24, "The const variable '%s' must be initia
lized"); | 574 static const CompileTimeErrorCode CONST_NOT_INITIALIZED = const CompileTimeErr
orCode.con1('CONST_NOT_INITIALIZED', 25, "The const variable '%s' must be initia
lized"); |
565 | 575 |
566 /** | 576 /** |
567 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 | 577 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
where e, e1 and e2 |
568 * are constant expressions that evaluate to a boolean value. | 578 * are constant expressions that evaluate to a boolean value. |
569 */ | 579 */ |
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"); | 580 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = const CompileTimeErro
rCode.con1('CONST_EVAL_TYPE_BOOL', 26, "An expression of type 'bool' was expecte
d"); |
571 | 581 |
572 /** | 582 /** |
573 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are | 583 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
e1 and e2 are |
574 * constant expressions that evaluate to a numeric, string or boolean value or
to null. | 584 * constant expressions that evaluate to a numeric, string or boolean value or
to null. |
575 */ | 585 */ |
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"); | 586 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = const Comp
ileTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 27, "An expression of t
ype 'bool', 'num', 'String' or 'null' was expected"); |
577 | 587 |
578 /** | 588 /** |
579 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 | 589 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 |
e2, e1 >> e2 or e1 |
580 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to | 590 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte
ger value or to |
581 * null. | 591 * null. |
582 */ | 592 */ |
583 static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = const CompileTimeError
Code.con1('CONST_EVAL_TYPE_INT', 27, "An expression of type 'int' was expected")
; | 593 static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = const CompileTimeError
Code.con1('CONST_EVAL_TYPE_INT', 28, "An expression of type 'int' was expected")
; |
584 | 594 |
585 /** | 595 /** |
586 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ | 596 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
e2, e1 / e2, e1 ~/ |
587 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant | 597 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are
constant |
588 * expressions that evaluate to a numeric value or to null.. | 598 * expressions that evaluate to a numeric value or to null.. |
589 */ | 599 */ |
590 static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = const CompileTimeError
Code.con1('CONST_EVAL_TYPE_NUM', 28, "An expression of type 'num' was expected")
; | 600 static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = const CompileTimeError
Code.con1('CONST_EVAL_TYPE_NUM', 29, "An expression of type 'num' was expected")
; |
591 | 601 |
592 /** | 602 /** |
593 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 603 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
594 * uncaught exception being thrown. | 604 * uncaught exception being thrown. |
595 */ | 605 */ |
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"); | 606 static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = const CompileT
imeErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 30, "Evaluation of this constan
t expression causes exception"); |
597 | 607 |
598 /** | 608 /** |
599 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 609 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
600 * uncaught exception being thrown. | 610 * uncaught exception being thrown. |
601 */ | 611 */ |
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"); | 612 static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = const CompileTimeE
rrorCode.con1('CONST_EVAL_THROWS_IDBZE', 31, "Evaluation of this constant expres
sion throws IntegerDivisionByZeroException"); |
603 | 613 |
604 /** | 614 /** |
605 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, | 615 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S<U<sub>1</sub>, &
hellip;, |
606 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a | 616 * U<sub>m</sub>></i>, let <i>R = S</i>; It is a compile time error if <i>S
</i> is not a |
607 * generic type with <i>m</i> type parameters. | 617 * generic type with <i>m</i> type parameters. |
608 * | 618 * |
609 * @param typeName the name of the type being referenced (<i>S</i>) | 619 * @param typeName the name of the type being referenced (<i>S</i>) |
610 * @param parameterCount the number of type parameters that were declared | 620 * @param parameterCount the number of type parameters that were declared |
611 * @param argumentCount the number of type arguments provided | 621 * @param argumentCount the number of type arguments provided |
612 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS | 622 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
613 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS | 623 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
614 */ | 624 */ |
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"); | 625 static const CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = const C
ompileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 32, "The type '%s
' is declared with %d type parameters, but %d type arguments were given"); |
616 | 626 |
617 /** | 627 /** |
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>, | 628 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip
;, a<sub>n</sub>, |
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 | 629 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
620 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same | 630 * compile-time error if the type <i>T</i> does not declare a constant constru
ctor with the same |
621 * name as the declaration of <i>T</i>. | 631 * name as the declaration of <i>T</i>. |
622 */ | 632 */ |
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"); | 633 static const CompileTimeErrorCode CONST_WITH_NON_CONST = const CompileTimeErro
rCode.con1('CONST_WITH_NON_CONST', 33, "The constructor being called is not a 'c
onst' constructor"); |
624 | 634 |
625 /** | 635 /** |
626 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 | 636 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>
a<sub>i</sub>, 1 |
627 * <= i <= n + k</i>, is not a compile-time constant expression. | 637 * <= i <= n + k</i>, is not a compile-time constant expression. |
628 */ | 638 */ |
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"); | 639 static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = const Com
pileTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 34, "Arguments of a c
onstant creation must be constant expressions"); |
630 | 640 |
631 /** | 641 /** |
632 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 642 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
633 * scope, optionally followed by type arguments. | 643 * scope, optionally followed by type arguments. |
634 * | 644 * |
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>, | 645 * 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>, |
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 | 646 * x<sub>n+1</sub>: a<sub>n+1</sub>, … x<sub>n+k</sub>: a<sub>n+k</sub>
)</i> it is a |
637 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally | 647 * compile-time error if <i>T</i> is not a class accessible in the current sco
pe, optionally |
638 * followed by type arguments. | 648 * followed by type arguments. |
639 * | 649 * |
640 * @param name the name of the non-type element | 650 * @param name the name of the non-type element |
641 */ | 651 */ |
642 static const CompileTimeErrorCode CONST_WITH_NON_TYPE = const CompileTimeError
Code.con1('CONST_WITH_NON_TYPE', 34, "The name '%s' is not a class"); | 652 static const CompileTimeErrorCode CONST_WITH_NON_TYPE = const CompileTimeError
Code.con1('CONST_WITH_NON_TYPE', 35, "The name '%s' is not a class"); |
643 | 653 |
644 /** | 654 /** |
645 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. | 655 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par
ameters. |
646 */ | 656 */ |
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"); | 657 static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = const CompileTi
meErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 36, "The constant creation cannot
use a type parameter"); |
648 | 658 |
649 /** | 659 /** |
650 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 660 * 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>. | 661 * constructor declared by the type <i>T</i>. |
652 * | 662 * |
653 * @param typeName the name of the type | 663 * @param typeName the name of the type |
654 * @param constructorName the name of the requested constant constructor | 664 * @param constructorName the name of the requested constant constructor |
655 */ | 665 */ |
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'"); | 666 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 37, "The class '%s' d
oes not have a constant constructor '%s'"); |
657 | 667 |
658 /** | 668 /** |
659 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant | 669 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
a constant |
660 * constructor declared by the type <i>T</i>. | 670 * constructor declared by the type <i>T</i>. |
661 * | 671 * |
662 * @param typeName the name of the type | 672 * @param typeName the name of the type |
663 */ | 673 */ |
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"); | 674 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = c
onst CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 38, "
The class '%s' does not have a default constant constructor"); |
665 | 675 |
666 /** | 676 /** |
667 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature | 677 * 15.3.1 Typedef: It is a compile-time error if any default values are specif
ied in the signature |
668 * of a function type alias. | 678 * of a function type alias. |
669 */ | 679 */ |
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"); | 680 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = const
CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 39, "Default
values aren't allowed in typedefs"); |
671 | 681 |
672 /** | 682 /** |
673 * 6.2.1 Required Formals: By means of a function signature that names the par
ameter and describes | 683 * 6.2.1 Required Formals: By means of a function signature that names the par
ameter and describes |
674 * its type as a function type. It is a compile-time error if any default valu
es are specified in | 684 * its type as a function type. It is a compile-time error if any default valu
es are specified in |
675 * the signature of such a function type. | 685 * the signature of such a function type. |
676 */ | 686 */ |
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"); | 687 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER =
const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 40,
"Default values aren't allowed in function type parameters"); |
678 | 688 |
679 /** | 689 /** |
680 * 7.6.2 Factories: It is a compile-time error if <i>k</i> explicitly specifie
s a default value | 690 * 7.6.2 Factories: It is a compile-time error if <i>k</i> explicitly specifie
s a default value |
681 * for an optional parameter. | 691 * for an optional parameter. |
682 */ | 692 */ |
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"); | 693 static const CompileTimeErrorCode DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRU
CTOR = const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CON
STRUCTOR', 41, "Default values aren't allowed in factory constructors that redir
ect to another constructor"); |
684 | 694 |
685 /** | 695 /** |
686 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 696 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
687 * declared in the same scope. | 697 * declared in the same scope. |
688 */ | 698 */ |
689 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = const Compil
eTimeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 41, "The default constructo
r is already defined"); | 699 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = const Compil
eTimeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 42, "The default constructo
r is already defined"); |
690 | 700 |
691 /** | 701 /** |
692 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 702 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
693 * declared in the same scope. | 703 * declared in the same scope. |
694 * | 704 * |
695 * @param duplicateName the name of the duplicate entity | 705 * @param duplicateName the name of the duplicate entity |
696 */ | 706 */ |
697 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = const CompileTi
meErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 42, "The constructor with name '%
s' is already defined"); | 707 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = const CompileTi
meErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 43, "The constructor with name '%
s' is already defined"); |
698 | 708 |
699 /** | 709 /** |
700 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name | 710 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi
th the same name |
701 * declared in the same scope. | 711 * declared in the same scope. |
702 * | 712 * |
703 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. | 713 * 7 Classes: It is a compile-time error if a class declares two members of th
e same name. |
704 * | 714 * |
705 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member | 715 * 7 Classes: It is a compile-time error if a class has an instance member and
a static member |
706 * with the same name. | 716 * with the same name. |
707 * | 717 * |
708 * @param duplicateName the name of the duplicate entity | 718 * @param duplicateName the name of the duplicate entity |
709 */ | 719 */ |
710 static const CompileTimeErrorCode DUPLICATE_DEFINITION = const CompileTimeErro
rCode.con1('DUPLICATE_DEFINITION', 43, "The name '%s' is already defined"); | 720 static const CompileTimeErrorCode DUPLICATE_DEFINITION = const CompileTimeErro
rCode.con1('DUPLICATE_DEFINITION', 44, "The name '%s' is already defined"); |
711 | 721 |
712 /** | 722 /** |
713 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member | 723 * 7. Classes: It is a compile-time error if a class has an instance member an
d a static member |
714 * with the same name. | 724 * with the same name. |
715 * | 725 * |
716 * This covers the additional duplicate definition cases where inheritance has
to be considered. | 726 * This covers the additional duplicate definition cases where inheritance has
to be considered. |
717 * | 727 * |
718 * @param className the name of the class that has conflicting instance/static
members | 728 * @param className the name of the class that has conflicting instance/static
members |
719 * @param name the name of the conflicting members | 729 * @param name the name of the conflicting members |
720 * @see #DUPLICATE_DEFINITION | 730 * @see #DUPLICATE_DEFINITION |
721 */ | 731 */ |
722 static const CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = const Com
pileTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 44, "The name '%s' is
already defined in '%s'"); | 732 static const CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = const Com
pileTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 45, "The name '%s' is
already defined in '%s'"); |
723 | 733 |
724 /** | 734 /** |
725 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = | 735 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>
i</sub> = |
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 | 736 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the
label for a named |
727 * argument]. | 737 * argument]. |
728 */ | 738 */ |
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"); | 739 static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = const CompileTime
ErrorCode.con1('DUPLICATE_NAMED_ARGUMENT', 46, "The argument for the named param
eter '%s' was already specified"); |
730 | 740 |
731 /** | 741 /** |
732 * SDK implementation libraries can be exported only by other SDK libraries. | 742 * SDK implementation libraries can be exported only by other SDK libraries. |
733 * | 743 * |
734 * @param uri the uri pointing to a library | 744 * @param uri the uri pointing to a library |
735 */ | 745 */ |
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"); | 746 static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = const CompileTimeE
rrorCode.con1('EXPORT_INTERNAL_LIBRARY', 47, "The library '%s' is internal and c
annot be exported"); |
737 | 747 |
738 /** | 748 /** |
739 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 749 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
740 * not a library declaration. | 750 * not a library declaration. |
741 * | 751 * |
742 * @param uri the uri pointing to a non-library declaration | 752 * @param uri the uri pointing to a non-library declaration |
743 */ | 753 */ |
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"); | 754 static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = const CompileTimeErr
orCode.con1('EXPORT_OF_NON_LIBRARY', 48, "The exported library '%s' must not hav
e a part-of directive"); |
745 | 755 |
746 /** | 756 /** |
747 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 757 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
748 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. | 758 * a type expression that does not denote a class available in the lexical sco
pe of <i>C</i>. |
749 * | 759 * |
750 * @param typeName the name of the superclass that was not found | 760 * @param typeName the name of the superclass that was not found |
751 */ | 761 */ |
752 static const CompileTimeErrorCode EXTENDS_NON_CLASS = const CompileTimeErrorCo
de.con1('EXTENDS_NON_CLASS', 48, "Classes can only extend other classes"); | 762 static const CompileTimeErrorCode EXTENDS_NON_CLASS = const CompileTimeErrorCo
de.con1('EXTENDS_NON_CLASS', 49, "Classes can only extend other classes"); |
753 | 763 |
754 /** | 764 /** |
755 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 765 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
756 * | 766 * |
757 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 767 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
758 * | 768 * |
759 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 769 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
760 * | 770 * |
761 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 771 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
762 * attempt to extend or implement num. | 772 * attempt to extend or implement num. |
763 * | 773 * |
764 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 774 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
765 * | 775 * |
766 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 776 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
767 * | 777 * |
768 * @param typeName the name of the type that cannot be extended | 778 * @param typeName the name of the type that cannot be extended |
769 * @see #IMPLEMENTS_DISALLOWED_CLASS | 779 * @see #IMPLEMENTS_DISALLOWED_CLASS |
770 */ | 780 */ |
771 static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = const CompileTime
ErrorCode.con1('EXTENDS_DISALLOWED_CLASS', 49, "Classes cannot extend '%s'"); | 781 static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = const CompileTime
ErrorCode.con1('EXTENDS_DISALLOWED_CLASS', 50, "Classes cannot extend '%s'"); |
772 | 782 |
773 /** | 783 /** |
774 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes | 784 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla
ss <i>C</i> includes |
775 * a deferred type expression. | 785 * a deferred type expression. |
776 * | 786 * |
777 * @param typeName the name of the type that cannot be extended | 787 * @param typeName the name of the type that cannot be extended |
778 * @see #IMPLEMENTS_DEFERRED_CLASS | 788 * @see #IMPLEMENTS_DEFERRED_CLASS |
779 * @see #MIXIN_DEFERRED_CLASS | 789 * @see #MIXIN_DEFERRED_CLASS |
780 */ | 790 */ |
781 static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS = const CompileTimeEr
rorCode.con1('EXTENDS_DEFERRED_CLASS', 50, "This class cannot extend the deferre
d class '%s'"); | 791 static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS = const CompileTimeEr
rorCode.con1('EXTENDS_DEFERRED_CLASS', 51, "This class cannot extend the deferre
d class '%s'"); |
782 | 792 |
783 /** | 793 /** |
784 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 794 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
785 * n</i>. | 795 * n</i>. |
786 * | 796 * |
787 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 797 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
788 * uncaught exception being thrown. | 798 * uncaught exception being thrown. |
789 * | 799 * |
790 * @param requiredCount the maximum number of positional arguments | 800 * @param requiredCount the maximum number of positional arguments |
791 * @param argumentCount the actual number of positional arguments given | 801 * @param argumentCount the actual number of positional arguments given |
792 */ | 802 */ |
793 static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = const CompileTi
meErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 51, "%d positional arguments expe
cted, but %d found"); | 803 static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = const CompileTi
meErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 52, "%d positional arguments expe
cted, but %d found"); |
794 | 804 |
795 /** | 805 /** |
796 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 806 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
797 * error if more than one initializer corresponding to a given instance variab
le appears in | 807 * error if more than one initializer corresponding to a given instance variab
le appears in |
798 * <i>k</i>'s list. | 808 * <i>k</i>'s list. |
799 */ | 809 */ |
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"); | 810 static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
const CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 5
3, "The field '%s' cannot be initialized twice in the same constructor"); |
801 | 811 |
802 /** | 812 /** |
803 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time | 813 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile time |
804 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized | 814 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is initialized |
805 * by means of an initializing formal of <i>k</i>. | 815 * by means of an initializing formal of <i>k</i>. |
806 */ | 816 */ |
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"); | 817 static const CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ
ER = const CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIAL
IZER', 54, "Fields cannot be initialized in both the parameter list and the init
ializers"); |
808 | 818 |
809 /** | 819 /** |
810 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by | 820 * 5 Variables: It is a compile-time error if a final instance variable that h
as is initialized by |
811 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same | 821 * means of an initializing formal of a constructor is also initialized elsewh
ere in the same |
812 * constructor. | 822 * constructor. |
813 * | 823 * |
814 * @param name the name of the field in question | 824 * @param name the name of the field in question |
815 */ | 825 */ |
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"); | 826 static const CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = const Com
pileTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 55, "'%s' is a final
field and so can only be set once"); |
817 | 827 |
818 /** | 828 /** |
819 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 829 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
820 * a function other than a non-redirecting generative constructor. | 830 * a function other than a non-redirecting generative constructor. |
821 */ | 831 */ |
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"); | 832 static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = cons
t CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 56, "Initia
lizing formal fields cannot be used in factory constructors"); |
823 | 833 |
824 /** | 834 /** |
825 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 835 * 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. | 836 * a function other than a non-redirecting generative constructor. |
827 */ | 837 */ |
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"); | 838 static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = cons
t CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 57, "Initia
lizing formal fields can only be used in constructors"); |
829 | 839 |
830 /** | 840 /** |
831 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 841 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
832 * only action is to invoke another generative constructor. | 842 * only action is to invoke another generative constructor. |
833 * | 843 * |
834 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by | 844 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin
g formal is used by |
835 * a function other than a non-redirecting generative constructor. | 845 * a function other than a non-redirecting generative constructor. |
836 */ | 846 */ |
837 static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
const CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 57,
"The redirecting constructor cannot have a field initializer"); | 847 static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
const CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 58,
"The redirecting constructor cannot have a field initializer"); |
838 | 848 |
839 /** | 849 /** |
840 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 850 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
841 * name. | 851 * name. |
842 * | 852 * |
843 * @param name the conflicting name of the getter and method | 853 * @param name the conflicting name of the getter and method |
844 */ | 854 */ |
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"); | 855 static const CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = const Com
pileTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 59, "'%s' cannot be u
sed to name a getter, there is already a method with the same name"); |
846 | 856 |
847 /** | 857 /** |
848 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 858 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
849 * specifies a malformed type or deferred type as a superinterface. | 859 * specifies a malformed type or deferred type as a superinterface. |
850 * | 860 * |
851 * @param typeName the name of the type that cannot be extended | 861 * @param typeName the name of the type that cannot be extended |
852 * @see #EXTENDS_DEFERRED_CLASS | 862 * @see #EXTENDS_DEFERRED_CLASS |
853 * @see #MIXIN_DEFERRED_CLASS | 863 * @see #MIXIN_DEFERRED_CLASS |
854 */ | 864 */ |
855 static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS = const CompileTim
eErrorCode.con1('IMPLEMENTS_DEFERRED_CLASS', 59, "This class cannot implement th
e deferred class '%s'"); | 865 static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS = const CompileTim
eErrorCode.con1('IMPLEMENTS_DEFERRED_CLASS', 60, "This class cannot implement th
e deferred class '%s'"); |
856 | 866 |
857 /** | 867 /** |
858 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 868 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
859 * | 869 * |
860 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 870 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
861 * | 871 * |
862 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 872 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
863 * | 873 * |
864 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 874 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
865 * attempt to extend or implement num. | 875 * attempt to extend or implement num. |
866 * | 876 * |
867 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 877 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
868 * | 878 * |
869 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 879 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
870 * | 880 * |
871 * @param typeName the name of the type that cannot be implemented | 881 * @param typeName the name of the type that cannot be implemented |
872 * @see #EXTENDS_DISALLOWED_CLASS | 882 * @see #EXTENDS_DISALLOWED_CLASS |
873 */ | 883 */ |
874 static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = const CompileT
imeErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 60, "Classes cannot implement '
%s'"); | 884 static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = const CompileT
imeErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 61, "Classes cannot implement '
%s'"); |
875 | 885 |
876 /** | 886 /** |
877 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes | 887 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class includes |
878 * type dynamic. | 888 * type dynamic. |
879 */ | 889 */ |
880 static const CompileTimeErrorCode IMPLEMENTS_DYNAMIC = const CompileTimeErrorC
ode.con1('IMPLEMENTS_DYNAMIC', 61, "Classes cannot implement 'dynamic'"); | 890 static const CompileTimeErrorCode IMPLEMENTS_DYNAMIC = const CompileTimeErrorC
ode.con1('IMPLEMENTS_DYNAMIC', 62, "Classes cannot implement 'dynamic'"); |
881 | 891 |
882 /** | 892 /** |
883 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> | 893 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o
f a class <i>C</i> |
884 * includes a type expression that does not denote a class available in the le
xical scope of | 894 * includes a type expression that does not denote a class available in the le
xical scope of |
885 * <i>C</i>. | 895 * <i>C</i>. |
886 * | 896 * |
887 * @param typeName the name of the interface that was not found | 897 * @param typeName the name of the interface that was not found |
888 */ | 898 */ |
889 static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = const CompileTimeErro
rCode.con1('IMPLEMENTS_NON_CLASS', 62, "Classes can only implement other classes
"); | 899 static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = const CompileTimeErro
rCode.con1('IMPLEMENTS_NON_CLASS', 63, "Classes can only implement other classes
"); |
890 | 900 |
891 /** | 901 /** |
892 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in | 902 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears
more than once in |
893 * the implements clause of a class. | 903 * the implements clause of a class. |
894 * | 904 * |
895 * @param className the name of the class that is implemented more than once | 905 * @param className the name of the class that is implemented more than once |
896 */ | 906 */ |
897 static const CompileTimeErrorCode IMPLEMENTS_REPEATED = const CompileTimeError
Code.con1('IMPLEMENTS_REPEATED', 63, "'%s' can only be implemented once"); | 907 static const CompileTimeErrorCode IMPLEMENTS_REPEATED = const CompileTimeError
Code.con1('IMPLEMENTS_REPEATED', 64, "'%s' can only be implemented once"); |
898 | 908 |
899 /** | 909 /** |
900 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears | 910 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla
ss <i>C</i> appears |
901 * in the implements clause of <i>C</i>. | 911 * in the implements clause of <i>C</i>. |
902 * | 912 * |
903 * @param className the name of the class that appears in both "extends" and "
implements" clauses | 913 * @param className the name of the class that appears in both "extends" and "
implements" clauses |
904 */ | 914 */ |
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"); | 915 static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = const CompileTimeEr
rorCode.con1('IMPLEMENTS_SUPER_CLASS', 65, "'%s' cannot be used in both 'extends
' and 'implements' clauses"); |
906 | 916 |
907 /** | 917 /** |
908 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of | 918 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
right hand side of |
909 * an initializer. | 919 * an initializer. |
910 * | 920 * |
911 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 921 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
912 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 922 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
913 * initializer of an instance variable. | 923 * initializer of an instance variable. |
914 * | 924 * |
915 * @param name the name of the type in question | 925 * @param name the name of the type in question |
916 */ | 926 */ |
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"); | 927 static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = con
st CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 66, "Only
static members can be accessed in initializers"); |
918 | 928 |
919 /** | 929 /** |
920 * SDK implementation libraries can be imported only by other SDK libraries. | 930 * SDK implementation libraries can be imported only by other SDK libraries. |
921 * | 931 * |
922 * @param uri the uri pointing to a library | 932 * @param uri the uri pointing to a library |
923 */ | 933 */ |
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"); | 934 static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = const CompileTimeE
rrorCode.con1('IMPORT_INTERNAL_LIBRARY', 67, "The library '%s' is internal and c
annot be imported"); |
925 | 935 |
926 /** | 936 /** |
927 * 14.1 Imports: It is a compile-time error if the specified URI of an immedia
te import does not | 937 * 14.1 Imports: It is a compile-time error if the specified URI of an immedia
te import does not |
928 * refer to a library declaration. | 938 * refer to a library declaration. |
929 * | 939 * |
930 * @param uri the uri pointing to a non-library declaration | 940 * @param uri the uri pointing to a non-library declaration |
931 * @see StaticWarningCode#IMPORT_OF_NON_LIBRARY | 941 * @see StaticWarningCode#IMPORT_OF_NON_LIBRARY |
932 */ | 942 */ |
933 static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = const CompileTimeErr
orCode.con1('IMPORT_OF_NON_LIBRARY', 67, "The imported library '%s' must not hav
e a part-of directive"); | 943 static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = const CompileTimeErr
orCode.con1('IMPORT_OF_NON_LIBRARY', 68, "The imported library '%s' must not hav
e a part-of directive"); |
934 | 944 |
935 /** | 945 /** |
936 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are | 946 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s
ub>k</sub></i> are |
937 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. | 947 * not instances of the same class <i>C</i>, for all <i>1 <= k <= n</i>. |
938 * | 948 * |
939 * @param expressionSource the expression source code that is the unexpected t
ype | 949 * @param expressionSource the expression source code that is the unexpected t
ype |
940 * @param expectedType the name of the expected type | 950 * @param expectedType the name of the expected type |
941 */ | 951 */ |
942 static const CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = const C
ompileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 68, "Case express
ions must have the same types, '%s' is not a '%s'"); | 952 static const CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = const C
ompileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 69, "Case express
ions must have the same types, '%s' is not a '%s'"); |
943 | 953 |
944 /** | 954 /** |
945 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 955 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
946 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 956 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
947 * instance variable declared in the immediately surrounding class. | 957 * instance variable declared in the immediately surrounding class. |
948 * | 958 * |
949 * @param id the name of the initializing formal that is not an instance varia
ble in the | 959 * @param id the name of the initializing formal that is not an instance varia
ble in the |
950 * immediately enclosing class | 960 * immediately enclosing class |
951 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD | 961 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD |
952 */ | 962 */ |
953 static const CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = const C
ompileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 69, "'%s' is not
a variable in the enclosing class"); | 963 static const CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = const C
ompileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 70, "'%s' is not
a variable in the enclosing class"); |
954 | 964 |
955 /** | 965 /** |
956 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 966 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
957 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an | 967 * error if <i>k</i>'s initializer list contains an initializer for a variable
that is not an |
958 * instance variable declared in the immediately surrounding class. | 968 * instance variable declared in the immediately surrounding class. |
959 * | 969 * |
960 * @param id the name of the initializing formal that is a static variable in
the immediately | 970 * @param id the name of the initializing formal that is a static variable in
the immediately |
961 * enclosing class | 971 * enclosing class |
962 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 972 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
963 */ | 973 */ |
964 static const CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = const Compile
TimeErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 70, "'%s' is a static variabl
e in the enclosing class, variables initialized in a constructor cannot be stati
c"); | 974 static const CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = const Compile
TimeErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 71, "'%s' is a static variabl
e in the enclosing class, variables initialized in a constructor cannot be stati
c"); |
965 | 975 |
966 /** | 976 /** |
967 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 977 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
968 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 978 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
969 * enclosing class. | 979 * enclosing class. |
970 * | 980 * |
971 * @param id the name of the initializing formal that is not an instance varia
ble in the | 981 * @param id the name of the initializing formal that is not an instance varia
ble in the |
972 * immediately enclosing class | 982 * immediately enclosing class |
973 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD | 983 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD |
974 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD | 984 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD |
975 */ | 985 */ |
976 static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
const CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 7
1, "'%s' is not a variable in the enclosing class"); | 986 static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD =
const CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 7
2, "'%s' is not a variable in the enclosing class"); |
977 | 987 |
978 /** | 988 /** |
979 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 989 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
980 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately | 990 * compile-time error if <i>id</i> is not the name of an instance variable of
the immediately |
981 * enclosing class. | 991 * enclosing class. |
982 * | 992 * |
983 * @param id the name of the initializing formal that is a static variable in
the immediately | 993 * @param id the name of the initializing formal that is a static variable in
the immediately |
984 * enclosing class | 994 * enclosing class |
985 * @see #INITIALIZER_FOR_STATIC_FIELD | 995 * @see #INITIALIZER_FOR_STATIC_FIELD |
986 */ | 996 */ |
987 static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = const
CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 72, "'%s' is
a static variable in the enclosing class, variables initialized in a constructor
cannot be static"); | 997 static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = const
CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 73, "'%s' is
a static variable in the enclosing class, variables initialized in a constructor
cannot be static"); |
988 | 998 |
989 /** | 999 /** |
990 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action | 1000 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr
action |
991 * <b>this</b>.<i>id</i>. | 1001 * <b>this</b>.<i>id</i>. |
992 */ | 1002 */ |
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"); | 1003 static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = const C
ompileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 74, "Instance mem
ber cannot be accessed from static method"); |
994 | 1004 |
995 /** | 1005 /** |
996 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1006 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
997 * character @, followed by a constant expression that must be either a refere
nce to a | 1007 * character @, followed by a constant expression that must be either a refere
nce to a |
998 * compile-time constant variable, or a call to a constant constructor. | 1008 * compile-time constant variable, or a call to a constant constructor. |
999 */ | 1009 */ |
1000 static const CompileTimeErrorCode INVALID_ANNOTATION = const CompileTimeErrorC
ode.con1('INVALID_ANNOTATION', 74, "Annotation can be only constant variable or
constant constructor invocation"); | 1010 static const CompileTimeErrorCode INVALID_ANNOTATION = const CompileTimeErrorC
ode.con1('INVALID_ANNOTATION', 75, "Annotation can be only constant variable or
constant constructor invocation"); |
1001 | 1011 |
1002 /** | 1012 /** |
1003 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1013 * 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 | 1014 * 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. | 1015 * compile-time constant variable, or a call to a constant constructor. |
1006 * | 1016 * |
1007 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a | 1017 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
1008 * deferred prefix. | 1018 * deferred prefix. |
1009 */ | 1019 */ |
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"); | 1020 static const CompileTimeErrorCode INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY = c
onst CompileTimeErrorCode.con1('INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY', 76, "
Constant values from a deferred library cannot be used as annotations"); |
1011 | 1021 |
1012 /** | 1022 /** |
1013 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time | 1023 * TODO(brianwilkerson) Remove this when we have decided on how to report erro
rs in compile-time |
1014 * constants. Until then, this acts as a placeholder for more informative erro
rs. | 1024 * constants. Until then, this acts as a placeholder for more informative erro
rs. |
1015 * | 1025 * |
1016 * See TODOs in ConstantVisitor | 1026 * See TODOs in ConstantVisitor |
1017 */ | 1027 */ |
1018 static const CompileTimeErrorCode INVALID_CONSTANT = const CompileTimeErrorCod
e.con1('INVALID_CONSTANT', 76, "Invalid constant value"); | 1028 static const CompileTimeErrorCode INVALID_CONSTANT = const CompileTimeErrorCod
e.con1('INVALID_CONSTANT', 77, "Invalid constant value"); |
1019 | 1029 |
1020 /** | 1030 /** |
1021 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor | 1031 * 7.6 Constructors: It is a compile-time error if the name of a constructor i
s not a constructor |
1022 * name. | 1032 * name. |
1023 */ | 1033 */ |
1024 static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = const CompileTime
ErrorCode.con1('INVALID_CONSTRUCTOR_NAME', 77, "Invalid constructor name"); | 1034 static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = const CompileTime
ErrorCode.con1('INVALID_CONSTRUCTOR_NAME', 78, "Invalid constructor name"); |
1025 | 1035 |
1026 /** | 1036 /** |
1027 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately | 1037 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of
the immediately |
1028 * enclosing class. | 1038 * enclosing class. |
1029 */ | 1039 */ |
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"); | 1040 static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = const Com
pileTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 79, "The name of the
immediately enclosing class expected"); |
1031 | 1041 |
1032 /** | 1042 /** |
1033 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable | 1043 * 12.10 This: It is a compile-time error if this appears in a top-level funct
ion or variable |
1034 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the | 1044 * initializer, in a factory constructor, or in a static method or variable in
itializer, or in the |
1035 * initializer of an instance variable. | 1045 * initializer of an instance variable. |
1036 */ | 1046 */ |
1037 static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = const CompileTim
eErrorCode.con1('INVALID_REFERENCE_TO_THIS', 79, "Invalid reference to 'this' ex
pression"); | 1047 static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = const CompileTim
eErrorCode.con1('INVALID_REFERENCE_TO_THIS', 80, "Invalid reference to 'this' ex
pression"); |
1038 | 1048 |
1039 /** | 1049 /** |
1040 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes | 1050 * 12.6 Lists: It is a compile time error if the type argument of a constant l
ist literal includes |
1041 * a type parameter. | 1051 * a type parameter. |
1042 * | 1052 * |
1043 * @name the name of the type parameter | 1053 * @name the name of the type parameter |
1044 */ | 1054 */ |
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'"); | 1055 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = const
CompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 81, "Constant l
ist literals cannot include a type parameter as a type argument, such as '%s'"); |
1046 | 1056 |
1047 /** | 1057 /** |
1048 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a | 1058 * 12.7 Maps: It is a compile time error if the type arguments of a constant m
ap literal include a |
1049 * type parameter. | 1059 * type parameter. |
1050 * | 1060 * |
1051 * @name the name of the type parameter | 1061 * @name the name of the type parameter |
1052 */ | 1062 */ |
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'"); | 1063 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = const C
ompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 82, "Constant map
literals cannot include a type parameter as a type argument, such as '%s'"); |
1054 | 1064 |
1055 /** | 1065 /** |
1056 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1066 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
1057 * not a library declaration. | 1067 * not a library declaration. |
1058 * | 1068 * |
1059 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1069 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
1060 * not a library declaration. | 1070 * not a library declaration. |
1061 * | 1071 * |
1062 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1072 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
1063 * declaration. | 1073 * declaration. |
1064 * | 1074 * |
1065 * @param uri the URI that is invalid | 1075 * @param uri the URI that is invalid |
1066 * @see #URI_DOES_NOT_EXIST | 1076 * @see #URI_DOES_NOT_EXIST |
1067 */ | 1077 */ |
1068 static const CompileTimeErrorCode INVALID_URI = const CompileTimeErrorCode.con
1('INVALID_URI', 82, "Invalid URI syntax: '%s'"); | 1078 static const CompileTimeErrorCode INVALID_URI = const CompileTimeErrorCode.con
1('INVALID_URI', 83, "Invalid URI syntax: '%s'"); |
1069 | 1079 |
1070 /** | 1080 /** |
1071 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1081 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
1072 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1082 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
1073 * | 1083 * |
1074 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1084 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
1075 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1085 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
1076 * | 1086 * |
1077 * @param labelName the name of the unresolvable label | 1087 * @param labelName the name of the unresolvable label |
1078 */ | 1088 */ |
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"); | 1089 static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = const CompileTimeErro
rCode.con1('LABEL_IN_OUTER_SCOPE', 84, "Cannot reference label '%s' declared in
an outer method"); |
1080 | 1090 |
1081 /** | 1091 /** |
1082 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within | 1092 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su
b></i> exists within |
1083 * the innermost function in which <i>s<sub>b</sub></i> occurs. | 1093 * the innermost function in which <i>s<sub>b</sub></i> occurs. |
1084 * | 1094 * |
1085 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use | 1095 * 13.14 Continue: It is a compile-time error if no such statement or case cla
use |
1086 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. | 1096 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub
>c</sub></i> occurs. |
1087 * | 1097 * |
1088 * @param labelName the name of the unresolvable label | 1098 * @param labelName the name of the unresolvable label |
1089 */ | 1099 */ |
1090 static const CompileTimeErrorCode LABEL_UNDEFINED = const CompileTimeErrorCode
.con1('LABEL_UNDEFINED', 84, "Cannot reference undefined label '%s'"); | 1100 static const CompileTimeErrorCode LABEL_UNDEFINED = const CompileTimeErrorCode
.con1('LABEL_UNDEFINED', 85, "Cannot reference undefined label '%s'"); |
1091 | 1101 |
1092 /** | 1102 /** |
1093 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... | 1103 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
... |
1094 * <i>e<sub>n</sub></i>] is evaluated as follows: | 1104 * <i>e<sub>n</sub></i>] is evaluated as follows: |
1095 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument | 1105 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
1096 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 1106 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
1097 * | 1107 * |
1098 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1108 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
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 <= | 1109 * <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 <= |
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>. | 1110 * 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>. |
1101 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1111 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
1102 * j <= m</i>. | 1112 * j <= m</i>. |
1103 */ | 1113 */ |
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'"); | 1114 static const CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const Com
pileTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 86, "The element type
'%s' cannot be assigned to the list type '%s'"); |
1105 | 1115 |
1106 /** | 1116 /** |
1107 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1117 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
1108 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1118 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
1109 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1119 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
1110 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1120 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
1111 * | 1121 * |
1112 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1122 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
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 <= | 1123 * <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 <= |
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>. | 1124 * 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>. |
1115 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1125 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
1116 * j <= m</i>. | 1126 * j <= m</i>. |
1117 */ | 1127 */ |
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'"); | 1128 static const CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = const CompileT
imeErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 87, "The element type '%s' cann
ot be assigned to the map key type '%s'"); |
1119 | 1129 |
1120 /** | 1130 /** |
1121 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 1131 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
1122 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: | 1132 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev
aluated as follows: |
1123 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 1133 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
1124 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 1134 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
1125 * | 1135 * |
1126 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 1136 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
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 <= | 1137 * <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 <= |
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>. | 1138 * 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>. |
1129 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 1139 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
1130 * j <= m</i>. | 1140 * j <= m</i>. |
1131 */ | 1141 */ |
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'"); | 1142 static const CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = const Compil
eTimeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 88, "The element type '%s'
cannot be assigned to the map value type '%s'"); |
1133 | 1143 |
1134 /** | 1144 /** |
1135 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name | 1145 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
with the same name |
1136 * as <i>C</i>. | 1146 * as <i>C</i>. |
1137 */ | 1147 */ |
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"); | 1148 static const CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = const CompileTimeEr
rorCode.con1('MEMBER_WITH_CLASS_NAME', 89, "Class members cannot have the same n
ame as the enclosing class"); |
1139 | 1149 |
1140 /** | 1150 /** |
1141 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same | 1151 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
method with the same |
1142 * name. | 1152 * name. |
1143 * | 1153 * |
1144 * @param name the conflicting name of the getter and method | 1154 * @param name the conflicting name of the getter and method |
1145 */ | 1155 */ |
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"); | 1156 static const CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = const Com
pileTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 90, "'%s' cannot be u
sed to name a method, there is already a getter with the same name"); |
1147 | 1157 |
1148 /** | 1158 /** |
1149 * 12.1 Constants: A constant expression is ... a constant list literal. | 1159 * 12.1 Constants: A constant expression is ... a constant list literal. |
1150 */ | 1160 */ |
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"); | 1161 static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = const Compil
eTimeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 91, "List literals must be
prefixed with 'const' when used as a constant expression"); |
1152 | 1162 |
1153 /** | 1163 /** |
1154 * 12.1 Constants: A constant expression is ... a constant map literal. | 1164 * 12.1 Constants: A constant expression is ... a constant map literal. |
1155 */ | 1165 */ |
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"); | 1166 static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = const Compile
TimeErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 92, "Map literals must be pre
fixed with 'const' when used as a constant expression"); |
1157 | 1167 |
1158 /** | 1168 /** |
1159 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a | 1169 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici
tly declares a |
1160 * constructor. | 1170 * constructor. |
1161 * | 1171 * |
1162 * @param typeName the name of the mixin that is invalid | 1172 * @param typeName the name of the mixin that is invalid |
1163 */ | 1173 */ |
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"); | 1174 static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = const CompileTi
meErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 93, "The class '%s' cannot be use
d as a mixin because it declares a constructor"); |
1165 | 1175 |
1166 /** | 1176 /** |
1167 * 9.1 Mixin Application: It is a compile-time error if the with clause of a m
ixin application | 1177 * 9.1 Mixin Application: It is a compile-time error if the with clause of a m
ixin application |
1168 * <i>C</i> includes a deferred type expression. | 1178 * <i>C</i> includes a deferred type expression. |
1169 * | 1179 * |
1170 * @param typeName the name of the type that cannot be extended | 1180 * @param typeName the name of the type that cannot be extended |
1171 * @see #EXTENDS_DEFERRED_CLASS | 1181 * @see #EXTENDS_DEFERRED_CLASS |
1172 * @see #IMPLEMENTS_DEFERRED_CLASS | 1182 * @see #IMPLEMENTS_DEFERRED_CLASS |
1173 */ | 1183 */ |
1174 static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErro
rCode.con1('MIXIN_DEFERRED_CLASS', 93, "This class cannot mixin the deferred cla
ss '%s'"); | 1184 static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErro
rCode.con1('MIXIN_DEFERRED_CLASS', 94, "This class cannot mixin the deferred cla
ss '%s'"); |
1175 | 1185 |
1176 /** | 1186 /** |
1177 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not | 1187 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who
se superclass is not |
1178 * Object. | 1188 * Object. |
1179 * | 1189 * |
1180 * @param typeName the name of the mixin that is invalid | 1190 * @param typeName the name of the mixin that is invalid |
1181 */ | 1191 */ |
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"); | 1192 static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = const Compi
leTimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 95, "The class '%s' canno
t be used as a mixin because it extends a class other than Object"); |
1183 | 1193 |
1184 /** | 1194 /** |
1185 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. | 1195 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i
mplement Null. |
1186 * | 1196 * |
1187 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. | 1197 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement int. |
1188 * | 1198 * |
1189 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. | 1199 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o
r implement double. |
1190 * | 1200 * |
1191 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to | 1201 * 12.3 Numbers: It is a compile-time error for any type other than the types
int and double to |
1192 * attempt to extend or implement num. | 1202 * attempt to extend or implement num. |
1193 * | 1203 * |
1194 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. | 1204 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend
or implement bool. |
1195 * | 1205 * |
1196 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. | 1206 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o
r implement String. |
1197 * | 1207 * |
1198 * @param typeName the name of the type that cannot be extended | 1208 * @param typeName the name of the type that cannot be extended |
1199 * @see #IMPLEMENTS_DISALLOWED_CLASS | 1209 * @see #IMPLEMENTS_DISALLOWED_CLASS |
1200 */ | 1210 */ |
1201 static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = const CompileTim
eErrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 95, "Classes cannot mixin '%s'"); | 1211 static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = const CompileTim
eErrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 96, "Classes cannot mixin '%s'"); |
1202 | 1212 |
1203 /** | 1213 /** |
1204 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin | 1214 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno
te a class or mixin |
1205 * available in the immediately enclosing scope. | 1215 * available in the immediately enclosing scope. |
1206 */ | 1216 */ |
1207 static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = const CompileTimeErrorC
ode.con1('MIXIN_OF_NON_CLASS', 96, "Classes can only mixin other classes"); | 1217 static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = const CompileTimeErrorC
ode.con1('MIXIN_OF_NON_CLASS', 97, "Classes can only mixin other classes"); |
1208 | 1218 |
1209 /** | 1219 /** |
1210 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. | 1220 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers
to super. |
1211 */ | 1221 */ |
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'"); | 1222 static const CompileTimeErrorCode MIXIN_REFERENCES_SUPER = const CompileTimeEr
rorCode.con1('MIXIN_REFERENCES_SUPER', 98, "The class '%s' cannot be used as a m
ixin because it references 'super'"); |
1213 | 1223 |
1214 /** | 1224 /** |
1215 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available | 1225 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno
te a class available |
1216 * in the immediately enclosing scope. | 1226 * in the immediately enclosing scope. |
1217 */ | 1227 */ |
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"); | 1228 static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = const Comp
ileTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 99, "Mixin can only be
applied to class"); |
1219 | 1229 |
1220 /** | 1230 /** |
1221 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1231 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
1222 * only action is to invoke another generative constructor. | 1232 * only action is to invoke another generative constructor. |
1223 */ | 1233 */ |
1224 static const CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= const CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
', 99, "Constructor may have at most one 'this' redirection"); | 1234 static const CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
= const CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
', 100, "Constructor may have at most one 'this' redirection"); |
1225 | 1235 |
1226 /** | 1236 /** |
1227 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may | 1237 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th
en <i>k</i> may |
1228 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. | 1238 * include at most one superinitializer in its initializer list or a compile t
ime error occurs. |
1229 */ | 1239 */ |
1230 static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = const CompileT
imeErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 100, "Constructor may have at m
ost one 'super' initializer"); | 1240 static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = const CompileT
imeErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 101, "Constructor may have at m
ost one 'super' initializer"); |
1231 | 1241 |
1232 /** | 1242 /** |
1233 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1243 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
1234 * character @, followed by a constant expression that must be either a refere
nce to a | 1244 * character @, followed by a constant expression that must be either a refere
nce to a |
1235 * compile-time constant variable, or a call to a constant constructor. | 1245 * compile-time constant variable, or a call to a constant constructor. |
1236 */ | 1246 */ |
1237 static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = const
CompileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 101, "Annotatio
n creation must have arguments"); | 1247 static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = const
CompileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 102, "Annotatio
n creation must have arguments"); |
1238 | 1248 |
1239 /** | 1249 /** |
1240 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer | 1250 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli
cit superinitializer |
1241 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the | 1251 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li
st, unless the |
1242 * enclosing class is class <i>Object</i>. | 1252 * enclosing class is class <i>Object</i>. |
1243 * | 1253 * |
1244 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1254 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
1245 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1255 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
1246 */ | 1256 */ |
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"); | 1257 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = cons
t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 103, "The c
lass '%s' does not have a default constructor"); |
1248 | 1258 |
1249 /** | 1259 /** |
1250 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a | 1260 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it
implicitly has a |
1251 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. | 1261 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj
ect</i>. |
1252 * | 1262 * |
1253 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a | 1263 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i>
does not declare a |
1254 * generative constructor named <i>S</i> (respectively <i>S.id</i>) | 1264 * generative constructor named <i>S</i> (respectively <i>S.id</i>) |
1255 */ | 1265 */ |
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"); | 1266 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = cons
t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 104, "The c
lass '%s' does not have a default constructor"); |
1257 | 1267 |
1258 /** | 1268 /** |
1259 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has | 1269 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma
p literal that has |
1260 * no explicit type arguments appears in a place where a statement is expected
. | 1270 * no explicit type arguments appears in a place where a statement is expected
. |
1261 */ | 1271 */ |
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"); | 1272 static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = cons
t CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 105, "A non
-constant map literal without type arguments cannot be used as an expression sta
tement"); |
1263 | 1273 |
1264 /** | 1274 /** |
1265 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 1275 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
1266 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 1276 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
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 | 1277 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
1268 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 1278 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
1269 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 1279 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
1270 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 1280 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
1271 * compile-time constants, for all <i>1 <= k <= n</i>. | 1281 * compile-time constants, for all <i>1 <= k <= n</i>. |
1272 */ | 1282 */ |
1273 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = const Compile
TimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 105, "Case expressions must b
e constant"); | 1283 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = const Compile
TimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 106, "Case expressions must b
e constant"); |
1274 | 1284 |
1275 /** | 1285 /** |
1276 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … | 1286 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub
>11</sub> … |
1277 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … | 1287 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> … label<sub>n1
</sub> … |
1278 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form | 1288 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s
ub>}</i> or the form |
1279 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: | 1289 * <i>switch (e) { label<sub>11</sub> … label<sub>1j1</sub> case e<sub>
1</sub>: |
1280 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: | 1290 * s<sub>1</sub> … label<sub>n1</sub> … label<sub>njn</sub> case
e<sub>n</sub>: |
1281 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not | 1291 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>
k</sub></i> are not |
1282 * compile-time constants, for all <i>1 <= k <= n</i>. | 1292 * compile-time constants, for all <i>1 <= k <= n</i>. |
1283 * | 1293 * |
1284 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a | 1294 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
1285 * deferred prefix. | 1295 * deferred prefix. |
1286 */ | 1296 */ |
1287 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_L
IBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION_FROM_DEFE
RRED_LIBRARY', 106, "Constant values from a deferred library cannot be used as a
case expression"); | 1297 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_L
IBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION_FROM_DEFE
RRED_LIBRARY', 107, "Constant values from a deferred library cannot be used as a
case expression"); |
1288 | 1298 |
1289 /** | 1299 /** |
1290 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 1300 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
1291 * parameter is not a compile-time constant. | 1301 * parameter is not a compile-time constant. |
1292 */ | 1302 */ |
1293 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = const CompileTi
meErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 107, "Default values of an option
al parameter must be constant"); | 1303 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = const CompileTi
meErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 108, "Default values of an option
al parameter must be constant"); |
1294 | 1304 |
1295 /** | 1305 /** |
1296 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional | 1306 * 6.2.2 Optional Formals: It is a compile-time error if the default value of
an optional |
1297 * parameter is not a compile-time constant. | 1307 * parameter is not a compile-time constant. |
1298 * | 1308 * |
1299 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a | 1309 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
1300 * deferred prefix. | 1310 * deferred prefix. |
1301 */ | 1311 */ |
1302 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIB
RARY = const CompileTimeErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED
_LIBRARY', 108, "Constant values from a deferred library cannot be used as a def
ault parameter value"); | 1312 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIB
RARY = const CompileTimeErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED
_LIBRARY', 109, "Constant values from a deferred library cannot be used as a def
ault parameter value"); |
1303 | 1313 |
1304 /** | 1314 /** |
1305 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 1315 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
1306 * compile-time constant. | 1316 * compile-time constant. |
1307 */ | 1317 */ |
1308 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = const CompileTim
eErrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 109, "'const' lists must have all c
onstant values"); | 1318 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = const CompileTim
eErrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 110, "'const' lists must have all c
onstant values"); |
1309 | 1319 |
1310 /** | 1320 /** |
1311 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a | 1321 * 12.6 Lists: It is a compile time error if an element of a constant list lit
eral is not a |
1312 * compile-time constant. | 1322 * compile-time constant. |
1313 * | 1323 * |
1314 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a | 1324 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
1315 * deferred prefix. | 1325 * deferred prefix. |
1316 */ | 1326 */ |
1317 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBR
ARY = const CompileTimeErrorCode.con1('NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_L
IBRARY', 110, "Constant values from a deferred library cannot be used as values
in a 'const' list"); | 1327 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBR
ARY = const CompileTimeErrorCode.con1('NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_L
IBRARY', 111, "Constant values from a deferred library cannot be used as values
in a 'const' list"); |
1318 | 1328 |
1319 /** | 1329 /** |
1320 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1330 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
1321 * literal is not a compile-time constant. | 1331 * literal is not a compile-time constant. |
1322 */ | 1332 */ |
1323 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = const CompileTimeErro
rCode.con1('NON_CONSTANT_MAP_KEY', 111, "The keys in a map must be constant"); | 1333 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = const CompileTimeErro
rCode.con1('NON_CONSTANT_MAP_KEY', 112, "The keys in a map must be constant"); |
1324 | 1334 |
1325 /** | 1335 /** |
1326 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1336 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
1327 * literal is not a compile-time constant. | 1337 * literal is not a compile-time constant. |
1328 * | 1338 * |
1329 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a | 1339 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
1330 * deferred prefix. | 1340 * deferred prefix. |
1331 */ | 1341 */ |
1332 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY =
const CompileTimeErrorCode.con1('NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY', 1
12, "Constant values from a deferred library cannot be used as keys in a map"); | 1342 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY =
const CompileTimeErrorCode.con1('NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY', 1
13, "Constant values from a deferred library cannot be used as keys in a map"); |
1333 | 1343 |
1334 /** | 1344 /** |
1335 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1345 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
1336 * literal is not a compile-time constant. | 1346 * literal is not a compile-time constant. |
1337 */ | 1347 */ |
1338 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = const CompileTimeEr
rorCode.con1('NON_CONSTANT_MAP_VALUE', 113, "The values in a 'const' map must be
constant"); | 1348 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = const CompileTimeEr
rorCode.con1('NON_CONSTANT_MAP_VALUE', 114, "The values in a 'const' map must be
constant"); |
1339 | 1349 |
1340 /** | 1350 /** |
1341 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map | 1351 * 12.7 Maps: It is a compile time error if either a key or a value of an entr
y in a constant map |
1342 * literal is not a compile-time constant. | 1352 * literal is not a compile-time constant. |
1343 * | 1353 * |
1344 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a | 1354 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
1345 * deferred prefix. | 1355 * deferred prefix. |
1346 */ | 1356 */ |
1347 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
= const CompileTimeErrorCode.con1('NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
', 114, "Constant values from a deferred library cannot be used as values in a '
const' map"); | 1357 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
= const CompileTimeErrorCode.con1('NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
', 115, "Constant values from a deferred library cannot be used as values in a '
const' map"); |
1348 | 1358 |
1349 /** | 1359 /** |
1350 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the | 1360 * 11 Metadata: Metadata consists of a series of annotations, each of which be
gin with the |
1351 * character @, followed by a constant expression that must be either a refere
nce to a | 1361 * character @, followed by a constant expression that must be either a refere
nce to a |
1352 * compile-time constant variable, or a call to a constant constructor. | 1362 * compile-time constant variable, or a call to a constant constructor. |
1353 * | 1363 * |
1354 * "From deferred library" case is covered by | 1364 * "From deferred library" case is covered by |
1355 * [CompileTimeErrorCode#INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY]. | 1365 * [CompileTimeErrorCode#INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY]. |
1356 */ | 1366 */ |
1357 static const CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = const
CompileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 115, "Annotatio
n creation can use only 'const' constructor"); | 1367 static const CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = const
CompileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 116, "Annotatio
n creation can use only 'const' constructor"); |
1358 | 1368 |
1359 /** | 1369 /** |
1360 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 1370 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
1361 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 1371 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
1362 */ | 1372 */ |
1363 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = const Co
mpileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 116, "Initializer e
xpressions in constant constructors must be constants"); | 1373 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = const Co
mpileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 117, "Initializer e
xpressions in constant constructors must be constants"); |
1364 | 1374 |
1365 /** | 1375 /** |
1366 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a | 1376 * 7.6.3 Constant Constructors: Any expression that appears within the initial
izer list of a |
1367 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. | 1377 * constant constructor must be a potentially constant expression, or a compil
e-time error occurs. |
1368 * | 1378 * |
1369 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a | 1379 * 12.1 Constants: A qualified reference to a static constant variable that is
not qualified by a |
1370 * deferred prefix. | 1380 * deferred prefix. |
1371 */ | 1381 */ |
1372 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFER
RED_LIBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER
_FROM_DEFERRED_LIBRARY', 117, "Constant values from a deferred library cannot be
used as constant initializers"); | 1382 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFER
RED_LIBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER
_FROM_DEFERRED_LIBRARY', 118, "Constant values from a deferred library cannot be
used as constant initializers"); |
1373 | 1383 |
1374 /** | 1384 /** |
1375 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. | 1385 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
or if <i>m > n</i>. |
1376 * | 1386 * |
1377 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1387 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
1378 * uncaught exception being thrown. | 1388 * uncaught exception being thrown. |
1379 * | 1389 * |
1380 * @param requiredCount the expected number of required arguments | 1390 * @param requiredCount the expected number of required arguments |
1381 * @param argumentCount the actual number of positional arguments given | 1391 * @param argumentCount the actual number of positional arguments given |
1382 */ | 1392 */ |
1383 static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const Compil
eTimeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 118, "%d required argument(
s) expected, but %d found"); | 1393 static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const Compil
eTimeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 119, "%d required argument(
s) expected, but %d found"); |
1384 | 1394 |
1385 /** | 1395 /** |
1386 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1396 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
1387 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1397 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
1388 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1398 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
1389 * (respectively <i>S.id</i>) | 1399 * (respectively <i>S.id</i>) |
1390 */ | 1400 */ |
1391 static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = const CompileTi
meErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 119, "The generative constructor
'%s' expected, but factory found"); | 1401 static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = const CompileTi
meErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 120, "The generative constructor
'%s' expected, but factory found"); |
1392 | 1402 |
1393 /** | 1403 /** |
1394 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. | 1404 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f
or class Object. |
1395 */ | 1405 */ |
1396 static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = const C
ompileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 120, ""); | 1406 static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = const C
ompileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 121, ""); |
1397 | 1407 |
1398 /** | 1408 /** |
1399 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. | 1409 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete
r in an operator. |
1400 */ | 1410 */ |
1401 static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = const Compi
leTimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 121, "Optional parameters
are not allowed when defining an operator"); | 1411 static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = const Compi
leTimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 122, "Optional parameters
are not allowed when defining an operator"); |
1402 | 1412 |
1403 /** | 1413 /** |
1404 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1414 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
1405 * declaration. | 1415 * declaration. |
1406 * | 1416 * |
1407 * @param uri the uri pointing to a non-library declaration | 1417 * @param uri the uri pointing to a non-library declaration |
1408 */ | 1418 */ |
1409 static const CompileTimeErrorCode PART_OF_NON_PART = const CompileTimeErrorCod
e.con1('PART_OF_NON_PART', 122, "The included part '%s' must have a part-of dire
ctive"); | 1419 static const CompileTimeErrorCode PART_OF_NON_PART = const CompileTimeErrorCod
e.con1('PART_OF_NON_PART', 123, "The included part '%s' must have a part-of dire
ctive"); |
1410 | 1420 |
1411 /** | 1421 /** |
1412 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member | 1422 * 14.1 Imports: It is a compile-time error if the current library declares a
top-level member |
1413 * named <i>p</i>. | 1423 * named <i>p</i>. |
1414 */ | 1424 */ |
1415 static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = cons
t CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 123, "The n
ame '%s' is already used as an import prefix and cannot be used to name a top-le
vel element"); | 1425 static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = cons
t CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 124, "The n
ame '%s' is already used as an import prefix and cannot be used to name a top-le
vel element"); |
1416 | 1426 |
1417 /** | 1427 /** |
1418 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter | 1428 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o
ptional parameter |
1419 * begins with an '_' character. | 1429 * begins with an '_' character. |
1420 */ | 1430 */ |
1421 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = const CompileTi
meErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 124, "Named optional parameters c
annot start with an underscore"); | 1431 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = const CompileTi
meErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 125, "Named optional parameters c
annot start with an underscore"); |
1422 | 1432 |
1423 /** | 1433 /** |
1424 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression | 1434 * 12.1 Constants: It is a compile-time error if the value of a compile-time c
onstant expression |
1425 * depends on itself. | 1435 * depends on itself. |
1426 */ | 1436 */ |
1427 static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = const Comp
ileTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 125, ""); | 1437 static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = const Comp
ileTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 126, ""); |
1428 | 1438 |
1429 /** | 1439 /** |
1430 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1440 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
1431 * only action is to invoke another generative constructor. | 1441 * only action is to invoke another generative constructor. |
1432 * | 1442 * |
1433 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in | 1443 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti
me error" in |
1434 * specification. But it was added to the co19 and there is same error for fac
tories. | 1444 * specification. But it was added to the co19 and there is same error for fac
tories. |
1435 * | 1445 * |
1436 * https://code.google.com/p/dart/issues/detail?id=954 | 1446 * https://code.google.com/p/dart/issues/detail?id=954 |
1437 */ | 1447 */ |
1438 static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = const Compi
leTimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 126, "Cycle in redirectin
g generative constructors"); | 1448 static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = const Compi
leTimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 127, "Cycle in redirectin
g generative constructors"); |
1439 | 1449 |
1440 /** | 1450 /** |
1441 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to | 1451 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr
uctor redirects to |
1442 * itself, either directly or indirectly via a sequence of redirections. | 1452 * itself, either directly or indirectly via a sequence of redirections. |
1443 */ | 1453 */ |
1444 static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = const CompileTi
meErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 127, "Cycle in redirecting factor
y constructors"); | 1454 static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = const CompileTi
meErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 128, "Cycle in redirecting factor
y constructors"); |
1445 | 1455 |
1446 /** | 1456 /** |
1447 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1457 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
1448 * superinterface of itself. | 1458 * superinterface of itself. |
1449 * | 1459 * |
1450 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1460 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
1451 * | 1461 * |
1452 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1462 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
1453 * | 1463 * |
1454 * @param className the name of the class that implements itself recursively | 1464 * @param className the name of the class that implements itself recursively |
1455 * @param strImplementsPath a string representation of the implements loop | 1465 * @param strImplementsPath a string representation of the implements loop |
1456 */ | 1466 */ |
1457 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = const Comp
ileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 128, "'%s' cannot be a
superinterface of itself: %s"); | 1467 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = const Comp
ileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 129, "'%s' cannot be a
superinterface of itself: %s"); |
1458 | 1468 |
1459 /** | 1469 /** |
1460 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1470 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
1461 * superinterface of itself. | 1471 * superinterface of itself. |
1462 * | 1472 * |
1463 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1473 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
1464 * | 1474 * |
1465 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1475 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
1466 * | 1476 * |
1467 * @param className the name of the class that implements itself recursively | 1477 * @param className the name of the class that implements itself recursively |
1468 */ | 1478 */ |
1469 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CA
SE_EXTENDS', 129, "'%s' cannot extend itself"); | 1479 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX
TENDS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CA
SE_EXTENDS', 130, "'%s' cannot extend itself"); |
1470 | 1480 |
1471 /** | 1481 /** |
1472 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a | 1482 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas
s <i>C</i> is a |
1473 * superinterface of itself. | 1483 * superinterface of itself. |
1474 * | 1484 * |
1475 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. | 1485 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi
nterface of itself. |
1476 * | 1486 * |
1477 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. | 1487 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super
class of itself. |
1478 * | 1488 * |
1479 * @param className the name of the class that implements itself recursively | 1489 * @param className the name of the class that implements itself recursively |
1480 */ | 1490 */ |
1481 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE
_CASE_IMPLEMENTS', 130, "'%s' cannot implement itself"); | 1491 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM
PLEMENTS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE
_CASE_IMPLEMENTS', 131, "'%s' cannot implement itself"); |
1482 | 1492 |
1483 /** | 1493 /** |
1484 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1494 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
1485 * <i>k'</i> is not a constant constructor. | 1495 * <i>k'</i> is not a constant constructor. |
1486 */ | 1496 */ |
1487 static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = const Comp
ileTimeErrorCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 131, "The constructor '
%s' could not be found in '%s'"); | 1497 static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = const Comp
ileTimeErrorCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 132, "The constructor '
%s' could not be found in '%s'"); |
1488 | 1498 |
1489 /** | 1499 /** |
1490 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1500 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
1491 * <i>k'</i> is not a constant constructor. | 1501 * <i>k'</i> is not a constant constructor. |
1492 */ | 1502 */ |
1493 static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS = const CompileTimeErr
orCode.con1('REDIRECT_TO_NON_CLASS', 132, "The name '%s' is not a type and canno
t be used in a redirected constructor"); | 1503 static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS = const CompileTimeErr
orCode.con1('REDIRECT_TO_NON_CLASS', 133, "The name '%s' is not a type and canno
t be used in a redirected constructor"); |
1494 | 1504 |
1495 /** | 1505 /** |
1496 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but | 1506 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th
e const modifier but |
1497 * <i>k'</i> is not a constant constructor. | 1507 * <i>k'</i> is not a constant constructor. |
1498 */ | 1508 */ |
1499 static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = const Co
mpileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 133, "Constant fact
ory constructor cannot delegate to a non-constant constructor"); | 1509 static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = const Co
mpileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 134, "Constant fact
ory constructor cannot delegate to a non-constant constructor"); |
1500 | 1510 |
1501 /** | 1511 /** |
1502 * 7.6.1 Generative constructors: A generative constructor may be <i>redirecti
ng</i>, in which | 1512 * 7.6.1 Generative constructors: A generative constructor may be <i>redirecti
ng</i>, in which |
1503 * case its only action is to invoke another generative constructor. | 1513 * case its only action is to invoke another generative constructor. |
1504 */ | 1514 */ |
1505 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR =
const CompileTimeErrorCode.con1('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', 1
34, "The constructor '%s' could not be found in '%s'"); | 1515 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR =
const CompileTimeErrorCode.con1('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', 1
35, "The constructor '%s' could not be found in '%s'"); |
1506 | 1516 |
1507 /** | 1517 /** |
1508 * 7.6.1 Generative constructors: A generative constructor may be <i>redirecti
ng</i>, in which | 1518 * 7.6.1 Generative constructors: A generative constructor may be <i>redirecti
ng</i>, in which |
1509 * case its only action is to invoke another generative constructor. | 1519 * case its only action is to invoke another generative constructor. |
1510 */ | 1520 */ |
1511 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTR
UCTOR = const CompileTimeErrorCode.con1('REDIRECT_GENERATIVE_TO_NON_GENERATIVE_C
ONSTRUCTOR', 135, "Generative constructor cannot redirect to a factory construct
or"); | 1521 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTR
UCTOR = const CompileTimeErrorCode.con1('REDIRECT_GENERATIVE_TO_NON_GENERATIVE_C
ONSTRUCTOR', 136, "Generative constructor cannot redirect to a factory construct
or"); |
1512 | 1522 |
1513 /** | 1523 /** |
1514 * 5 Variables: A local variable may only be referenced at a source code locat
ion that is after | 1524 * 5 Variables: A local variable may only be referenced at a source code locat
ion that is after |
1515 * its initializer, if any, is complete, or a compile-time error occurs. | 1525 * its initializer, if any, is complete, or a compile-time error occurs. |
1516 */ | 1526 */ |
1517 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = const Compil
eTimeErrorCode.con1('REFERENCED_BEFORE_DECLARATION', 136, "Local variables canno
t be referenced before they are declared"); | 1527 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = const Compil
eTimeErrorCode.con1('REFERENCED_BEFORE_DECLARATION', 137, "Local variables canno
t be referenced before they are declared"); |
1518 | 1528 |
1519 /** | 1529 /** |
1520 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not | 1530 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>
rethrow;</i> is not |
1521 * enclosed within a on-catch clause. | 1531 * enclosed within a on-catch clause. |
1522 */ | 1532 */ |
1523 static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = const CompileTimeErr
orCode.con1('RETHROW_OUTSIDE_CATCH', 137, "rethrow must be inside of a catch cla
use"); | 1533 static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = const CompileTimeErr
orCode.con1('RETHROW_OUTSIDE_CATCH', 138, "rethrow must be inside of a catch cla
use"); |
1524 | 1534 |
1525 /** | 1535 /** |
1526 * 13.12 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> | 1536 * 13.12 Return: It is a compile-time error if a return statement of the form
<i>return e;</i> |
1527 * appears in a generative constructor. | 1537 * appears in a generative constructor. |
1528 */ | 1538 */ |
1529 static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 138, "Constructors ca
nnot return a value"); | 1539 static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 139, "Constructors ca
nnot return a value"); |
1530 | 1540 |
1531 /** | 1541 /** |
1532 * 14.1 Imports: It is a compile-time error if a prefix used in a deferred imp
ort is used in | 1542 * 14.1 Imports: It is a compile-time error if a prefix used in a deferred imp
ort is used in |
1533 * another import clause. | 1543 * another import clause. |
1534 */ | 1544 */ |
1535 static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX = const CompileTimeEr
rorCode.con1('SHARED_DEFERRED_PREFIX', 139, "The prefix of a deferred import can
not be used in other import directives"); | 1545 static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX = const CompileTimeEr
rorCode.con1('SHARED_DEFERRED_PREFIX', 140, "The prefix of a deferred import can
not be used in other import directives"); |
1536 | 1546 |
1537 /** | 1547 /** |
1538 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 1548 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
1539 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 1549 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
1540 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation | 1550 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe
r method invocation |
1541 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or | 1551 * occurs in a top-level function or variable initializer, in an instance vari
able initializer or |
1542 * initializer list, in class Object, in a factory constructor, or in a static
method or variable | 1552 * initializer list, in class Object, in a factory constructor, or in a static
method or variable |
1543 * initializer. | 1553 * initializer. |
1544 */ | 1554 */ |
1545 static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = const CompileTime
ErrorCode.con1('SUPER_IN_INVALID_CONTEXT', 140, "Invalid context for 'super' inv
ocation"); | 1555 static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = const CompileTime
ErrorCode.con1('SUPER_IN_INVALID_CONTEXT', 141, "Invalid context for 'super' inv
ocation"); |
1546 | 1556 |
1547 /** | 1557 /** |
1548 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its | 1558 * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
in which case its |
1549 * only action is to invoke another generative constructor. | 1559 * only action is to invoke another generative constructor. |
1550 */ | 1560 */ |
1551 static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 141, "The redirecting
constructor cannot have a 'super' initializer"); | 1561 static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = const Com
pileTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 142, "The redirecting
constructor cannot have a 'super' initializer"); |
1552 | 1562 |
1553 /** | 1563 /** |
1554 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time | 1564 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
is a compile-time |
1555 * error if a generative constructor of class Object includes a superinitializ
er. | 1565 * error if a generative constructor of class Object includes a superinitializ
er. |
1556 */ | 1566 */ |
1557 static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = const CompileT
imeErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 142, ""); | 1567 static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = const CompileT
imeErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 143, ""); |
1558 | 1568 |
1559 /** | 1569 /** |
1560 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a | 1570 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a |
1561 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object | 1571 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object |
1562 * expression are not subtypes of the bounds of the corresponding formal type
parameters of | 1572 * expression are not subtypes of the bounds of the corresponding formal type
parameters of |
1563 * <i>G</i>. | 1573 * <i>G</i>. |
1564 * | 1574 * |
1565 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a | 1575 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if
T is mal-bounded a |
1566 * dynamic error occurs. | 1576 * dynamic error occurs. |
1567 * | 1577 * |
1568 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise | 1578 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time
constant would raise |
1569 * an exception. | 1579 * an exception. |
1570 * | 1580 * |
1571 * @param boundedTypeName the name of the type used in the instance creation t
hat should be | 1581 * @param boundedTypeName the name of the type used in the instance creation t
hat should be |
1572 * limited by the bound as specified in the class declaration | 1582 * limited by the bound as specified in the class declaration |
1573 * @param boundingTypeName the name of the bounding type | 1583 * @param boundingTypeName the name of the bounding type |
1574 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS | 1584 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS |
1575 */ | 1585 */ |
1576 static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const Co
mpileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 143, "'%s' does not
extend '%s'"); | 1586 static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const Co
mpileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 144, "'%s' does not
extend '%s'"); |
1577 | 1587 |
1578 /** | 1588 /** |
1579 * 15.3.1 Typedef: Any self reference, either directly, or recursively via ano
ther typedef, is a | 1589 * 15.3.1 Typedef: Any self reference, either directly, or recursively via ano
ther typedef, is a |
1580 * compile time error. | 1590 * compile time error. |
1581 */ | 1591 */ |
1582 static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = const C
ompileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 144, "Type alias
cannot reference itself directly or recursively via another typedef"); | 1592 static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = const C
ompileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 145, "Type alias
cannot reference itself directly or recursively via another typedef"); |
1583 | 1593 |
1584 /** | 1594 /** |
1585 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current | 1595 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access
ible in the current |
1586 * scope, optionally followed by type arguments. | 1596 * scope, optionally followed by type arguments. |
1587 */ | 1597 */ |
1588 static const CompileTimeErrorCode UNDEFINED_CLASS = const CompileTimeErrorCode
.con1('UNDEFINED_CLASS', 145, "Undefined class '%s'"); | 1598 static const CompileTimeErrorCode UNDEFINED_CLASS = const CompileTimeErrorCode
.con1('UNDEFINED_CLASS', 146, "Undefined class '%s'"); |
1589 | 1599 |
1590 /** | 1600 /** |
1591 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1601 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
1592 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1602 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
1593 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1603 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
1594 * (respectively <i>S.id</i>) | 1604 * (respectively <i>S.id</i>) |
1595 */ | 1605 */ |
1596 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = const
CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 146, "The cla
ss '%s' does not have a generative constructor '%s'"); | 1606 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = const
CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 147, "The cla
ss '%s' does not have a generative constructor '%s'"); |
1597 | 1607 |
1598 /** | 1608 /** |
1599 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears | 1609 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super
initializer appears |
1600 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is | 1610 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ
e constructor. It is |
1601 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> | 1611 * a compile-time error if class <i>S</i> does not declare a generative constr
uctor named <i>S</i> |
1602 * (respectively <i>S.id</i>) | 1612 * (respectively <i>S.id</i>) |
1603 */ | 1613 */ |
1604 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= const CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
', 147, "The class '%s' does not have a default generative constructor"); | 1614 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
= const CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
', 148, "The class '%s' does not have a default generative constructor"); |
1605 | 1615 |
1606 /** | 1616 /** |
1607 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 1617 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
1608 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... | 1618 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> ... |
1609 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 1619 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
1610 * | 1620 * |
1611 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an | 1621 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec
t results in an |
1612 * uncaught exception being thrown. | 1622 * uncaught exception being thrown. |
1613 * | 1623 * |
1614 * @param name the name of the requested named parameter | 1624 * @param name the name of the requested named parameter |
1615 */ | 1625 */ |
1616 static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = const CompileTim
eErrorCode.con1('UNDEFINED_NAMED_PARAMETER', 148, "The named parameter '%s' is n
ot defined"); | 1626 static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = const CompileTim
eErrorCode.con1('UNDEFINED_NAMED_PARAMETER', 149, "The named parameter '%s' is n
ot defined"); |
1617 | 1627 |
1618 /** | 1628 /** |
1619 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1629 * 14.2 Exports: It is a compile-time error if the compilation unit found at t
he specified URI is |
1620 * not a library declaration. | 1630 * not a library declaration. |
1621 * | 1631 * |
1622 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is | 1632 * 14.1 Imports: It is a compile-time error if the compilation unit found at t
he specified URI is |
1623 * not a library declaration. | 1633 * not a library declaration. |
1624 * | 1634 * |
1625 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part | 1635 * 14.3 Parts: It is a compile time error if the contents of the URI are not a
valid part |
1626 * declaration. | 1636 * declaration. |
1627 * | 1637 * |
1628 * @param uri the URI pointing to a non-existent file | 1638 * @param uri the URI pointing to a non-existent file |
1629 * @see #INVALID_URI | 1639 * @see #INVALID_URI |
1630 */ | 1640 */ |
1631 static const CompileTimeErrorCode URI_DOES_NOT_EXIST = const CompileTimeErrorC
ode.con1('URI_DOES_NOT_EXIST', 149, "Target of URI does not exist: '%s'"); | 1641 static const CompileTimeErrorCode URI_DOES_NOT_EXIST = const CompileTimeErrorC
ode.con1('URI_DOES_NOT_EXIST', 150, "Target of URI does not exist: '%s'"); |
1632 | 1642 |
1633 /** | 1643 /** |
1634 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if | 1644 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time
constant, or if |
1635 * <i>x</i> involves string interpolation. | 1645 * <i>x</i> involves string interpolation. |
1636 * | 1646 * |
1637 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if | 1647 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co
nstant, or if |
1638 * <i>s</i> involves string interpolation. | 1648 * <i>s</i> involves string interpolation. |
1639 * | 1649 * |
1640 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is | 1650 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d
escribes a URI is |
1641 * not a compile-time constant, or if <i>x</i> involves string interpolation. | 1651 * not a compile-time constant, or if <i>x</i> involves string interpolation. |
1642 */ | 1652 */ |
1643 static const CompileTimeErrorCode URI_WITH_INTERPOLATION = const CompileTimeEr
rorCode.con1('URI_WITH_INTERPOLATION', 150, "URIs cannot use string interpolatio
n"); | 1653 static const CompileTimeErrorCode URI_WITH_INTERPOLATION = const CompileTimeEr
rorCode.con1('URI_WITH_INTERPOLATION', 151, "URIs cannot use string interpolatio
n"); |
1644 | 1654 |
1645 /** | 1655 /** |
1646 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is | 1656 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar
ed operator []= is |
1647 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the | 1657 * not 2. It is a compile time error if the arity of a user-declared operator
with one of the |
1648 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. | 1658 * names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >
;>, [] is not 1. |
1649 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a | 1659 * It is a compile time error if the arity of the user-declared operator - is
not 0 or 1. It is a |
1650 * compile time error if the arity of the user-declared operator ~ is not 0. | 1660 * compile time error if the arity of the user-declared operator ~ is not 0. |
1651 * | 1661 * |
1652 * @param operatorName the name of the declared operator | 1662 * @param operatorName the name of the declared operator |
1653 * @param expectedNumberOfParameters the number of parameters expected | 1663 * @param expectedNumberOfParameters the number of parameters expected |
1654 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1664 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
1655 */ | 1665 */ |
1656 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = co
nst CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 151, "O
perator '%s' should declare exactly %d parameter(s), but %d found"); | 1666 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = co
nst CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 152, "O
perator '%s' should declare exactly %d parameter(s), but %d found"); |
1657 | 1667 |
1658 /** | 1668 /** |
1659 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not | 1669 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar
ed operator - is not |
1660 * 0 or 1. | 1670 * 0 or 1. |
1661 * | 1671 * |
1662 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration | 1672 * @param actualNumberOfParameters the number of parameters found in the opera
tor declaration |
1663 */ | 1673 */ |
1664 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = const CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MIN
US', 152, "Operator '-' should declare 0 or 1 parameter, but %d found"); | 1674 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU
S = const CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MIN
US', 153, "Operator '-' should declare 0 or 1 parameter, but %d found"); |
1665 | 1675 |
1666 /** | 1676 /** |
1667 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include | 1677 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list
does not include |
1668 * exactly one required formal parameter <i>p</i>. | 1678 * exactly one required formal parameter <i>p</i>. |
1669 */ | 1679 */ |
1670 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = cons
t CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 153, "Sette
rs should declare exactly one required parameter"); | 1680 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = cons
t CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 154, "Sette
rs should declare exactly one required parameter"); |
1671 | 1681 |
1672 static const List<CompileTimeErrorCode> values = const [ | 1682 static const List<CompileTimeErrorCode> values = const [ |
1673 AMBIGUOUS_EXPORT, | 1683 AMBIGUOUS_EXPORT, |
1674 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, | 1684 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, |
1675 BUILT_IN_IDENTIFIER_AS_TYPE, | 1685 BUILT_IN_IDENTIFIER_AS_TYPE, |
1676 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, | 1686 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, |
1677 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, | 1687 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, |
1678 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, | 1688 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, |
1679 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | 1689 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
1680 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, | 1690 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, |
1681 CONFLICTING_GETTER_AND_METHOD, | 1691 CONFLICTING_GETTER_AND_METHOD, |
1682 CONFLICTING_METHOD_AND_GETTER, | 1692 CONFLICTING_METHOD_AND_GETTER, |
1683 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, | 1693 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, |
1684 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, | 1694 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, |
1685 CONFLICTING_TYPE_VARIABLE_AND_CLASS, | 1695 CONFLICTING_TYPE_VARIABLE_AND_CLASS, |
1686 CONFLICTING_TYPE_VARIABLE_AND_MEMBER, | 1696 CONFLICTING_TYPE_VARIABLE_AND_MEMBER, |
1687 CONST_CONSTRUCTOR_THROWS_EXCEPTION, | 1697 CONST_CONSTRUCTOR_THROWS_EXCEPTION, |
| 1698 CONST_CONSTRUCTOR_WITH_MIXIN, |
1688 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, | 1699 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, |
1689 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, | 1700 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, |
1690 CONST_DEFERRED_CLASS, | 1701 CONST_DEFERRED_CLASS, |
1691 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, | 1702 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, |
1692 CONST_FORMAL_PARAMETER, | 1703 CONST_FORMAL_PARAMETER, |
1693 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, | 1704 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, |
1694 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY, | 1705 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY, |
1695 CONST_INSTANCE_FIELD, | 1706 CONST_INSTANCE_FIELD, |
1696 CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | 1707 CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
1697 CONST_NOT_INITIALIZED, | 1708 CONST_NOT_INITIALIZED, |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2736 /** | 2747 /** |
2737 * 12.28 Unary Expressions: The expression !<i>e</i> is equivalent to the expr
ession | 2748 * 12.28 Unary Expressions: The expression !<i>e</i> is equivalent to the expr
ession |
2738 * <i>e</i>?<b>false<b> : <b>true</b>. | 2749 * <i>e</i>?<b>false<b> : <b>true</b>. |
2739 * | 2750 * |
2740 * 12.20 Conditional: It is a static type warning if the type of <i>e<sub>1</s
ub></i> may not be | 2751 * 12.20 Conditional: It is a static type warning if the type of <i>e<sub>1</s
ub></i> may not be |
2741 * assigned to bool. | 2752 * assigned to bool. |
2742 */ | 2753 */ |
2743 static const StaticTypeWarningCode NON_BOOL_NEGATION_EXPRESSION = const Static
TypeWarningCode.con1('NON_BOOL_NEGATION_EXPRESSION', 10, "Negation argument must
have a static type of 'bool'"); | 2754 static const StaticTypeWarningCode NON_BOOL_NEGATION_EXPRESSION = const Static
TypeWarningCode.con1('NON_BOOL_NEGATION_EXPRESSION', 10, "Negation argument must
have a static type of 'bool'"); |
2744 | 2755 |
2745 /** | 2756 /** |
| 2757 * 12.21 Logical Boolean Expressions: It is a static type warning if the stati
c types of both of |
| 2758 * <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> may not be assigned to bool. |
| 2759 * |
| 2760 * @param operator the lexeme of the logical operator |
| 2761 */ |
| 2762 static const StaticTypeWarningCode NON_BOOL_OPERAND = const StaticTypeWarningC
ode.con1('NON_BOOL_OPERAND', 11, "The operands of the '%s' operator must be assi
gnable to 'bool'"); |
| 2763 |
| 2764 /** |
2746 * 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>,
1 <= i <= | 2765 * 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>,
1 <= i <= |
2747 * n</i> does not denote a type in the enclosing lexical scope. | 2766 * n</i> does not denote a type in the enclosing lexical scope. |
2748 */ | 2767 */ |
2749 static const StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = const StaticTyp
eWarningCode.con1('NON_TYPE_AS_TYPE_ARGUMENT', 11, "The name '%s' is not a type
and cannot be used as a parameterized type"); | 2768 static const StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = const StaticTyp
eWarningCode.con1('NON_TYPE_AS_TYPE_ARGUMENT', 12, "The name '%s' is not a type
and cannot be used as a parameterized type"); |
2750 | 2769 |
2751 /** | 2770 /** |
2752 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b
e assigned to the | 2771 * 13.11 Return: It is a static type warning if the type of <i>e</i> may not b
e assigned to the |
2753 * declared return type of the immediately enclosing function. | 2772 * declared return type of the immediately enclosing function. |
2754 * | 2773 * |
2755 * @param actualReturnType the return type as declared in the return statement | 2774 * @param actualReturnType the return type as declared in the return statement |
2756 * @param expectedReturnType the expected return type as defined by the method | 2775 * @param expectedReturnType the expected return type as defined by the method |
2757 * @param methodName the name of the method | 2776 * @param methodName the name of the method |
2758 */ | 2777 */ |
2759 static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE = const StaticTypeWa
rningCode.con1('RETURN_OF_INVALID_TYPE', 12, "The return type '%s' is not a '%s'
, as defined by the method '%s'"); | 2778 static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE = const StaticTypeWa
rningCode.con1('RETURN_OF_INVALID_TYPE', 13, "The return type '%s' is not a '%s'
, as defined by the method '%s'"); |
2760 | 2779 |
2761 /** | 2780 /** |
2762 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a | 2781 * 12.11 Instance Creation: It is a static type warning if any of the type arg
uments to a |
2763 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object | 2782 * constructor of a generic type <i>G</i> invoked by a new expression or a con
stant object |
2764 * expression are not subtypes of the bounds of the corresponding formal type
parameters of | 2783 * expression are not subtypes of the bounds of the corresponding formal type
parameters of |
2765 * <i>G</i>. | 2784 * <i>G</i>. |
2766 * | 2785 * |
2767 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</
i> of <i>G</i>, then | 2786 * 15.8 Parameterized Types: If <i>S</i> is the static type of a member <i>m</
i> of <i>G</i>, then |
2768 * the static type of the member <i>m</i> of <i>G<A<sub>1</sub>, …, | 2787 * the static type of the member <i>m</i> of <i>G<A<sub>1</sub>, …, |
2769 * A<sub>n</sub>></i> is <i>[A<sub>1</sub>, …, A<sub>n</sub>/T<sub>1
</sub>, …, | 2788 * A<sub>n</sub>></i> is <i>[A<sub>1</sub>, …, A<sub>n</sub>/T<sub>1
</sub>, …, |
2770 * T<sub>n</sub>]S</i> where <i>T<sub>1</sub>, …, T<sub>n</sub></i> are
the formal type | 2789 * T<sub>n</sub>]S</i> where <i>T<sub>1</sub>, …, T<sub>n</sub></i> are
the formal type |
2771 * parameters of <i>G</i>. Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>
i</sub>, 1 <= i | 2790 * parameters of <i>G</i>. Let <i>B<sub>i</sub></i> be the bounds of <i>T<sub>
i</sub>, 1 <= i |
2772 * <= n</i>. It is a static type warning if <i>A<sub>i</sub></i> is not a s
ubtype of | 2791 * <= n</i>. It is a static type warning if <i>A<sub>i</sub></i> is not a s
ubtype of |
2773 * <i>[A<sub>1</sub>, …, A<sub>n</sub>/T<sub>1</sub>, …, | 2792 * <i>[A<sub>1</sub>, …, A<sub>n</sub>/T<sub>1</sub>, …, |
2774 * T<sub>n</sub>]B<sub>i</sub>, 1 <= i <= n</i>. | 2793 * T<sub>n</sub>]B<sub>i</sub>, 1 <= i <= n</i>. |
2775 * | 2794 * |
2776 * 7.6.2 Factories: It is a static type warning if any of the type arguments t
o <i>k'</i> are not | 2795 * 7.6.2 Factories: It is a static type warning if any of the type arguments t
o <i>k'</i> are not |
2777 * subtypes of the bounds of the corresponding formal type parameters of type. | 2796 * subtypes of the bounds of the corresponding formal type parameters of type. |
2778 * | 2797 * |
2779 * @param boundedTypeName the name of the type used in the instance creation t
hat should be | 2798 * @param boundedTypeName the name of the type used in the instance creation t
hat should be |
2780 * limited by the bound as specified in the class declaration | 2799 * limited by the bound as specified in the class declaration |
2781 * @param boundingTypeName the name of the bounding type | 2800 * @param boundingTypeName the name of the bounding type |
2782 * @see #TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND | 2801 * @see #TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND |
2783 */ | 2802 */ |
2784 static const StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const S
taticTypeWarningCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 13, "'%s' does no
t extend '%s'"); | 2803 static const StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const S
taticTypeWarningCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 14, "'%s' does no
t extend '%s'"); |
2785 | 2804 |
2786 /** | 2805 /** |
2787 * 10 Generics: It is a static type warning if a type parameter is a supertype
of its upper bound. | 2806 * 10 Generics: It is a static type warning if a type parameter is a supertype
of its upper bound. |
2788 * | 2807 * |
2789 * @param typeParameterName the name of the type parameter | 2808 * @param typeParameterName the name of the type parameter |
2790 * @see #TYPE_ARGUMENT_NOT_MATCHING_BOUNDS | 2809 * @see #TYPE_ARGUMENT_NOT_MATCHING_BOUNDS |
2791 */ | 2810 */ |
2792 static const StaticTypeWarningCode TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND = con
st StaticTypeWarningCode.con1('TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND', 14, "'%s'
cannot be a supertype of its upper bound"); | 2811 static const StaticTypeWarningCode TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND = con
st StaticTypeWarningCode.con1('TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND', 15, "'%s'
cannot be a supertype of its upper bound"); |
2793 | 2812 |
2794 /** | 2813 /** |
2795 * 12.15.3 Unqualified Invocation: If there exists a lexically visible declara
tion named | 2814 * 12.15.3 Unqualified Invocation: If there exists a lexically visible declara
tion named |
2796 * <i>id</i>, let <i>f<sub>id</sub></i> be the innermost such declaration. The
n: [skip]. | 2815 * <i>id</i>, let <i>f<sub>id</sub></i> be the innermost such declaration. The
n: [skip]. |
2797 * Otherwise, <i>f<sub>id</sub></i> is considered equivalent to the ordinary m
ethod invocation | 2816 * Otherwise, <i>f<sub>id</sub></i> is considered equivalent to the ordinary m
ethod invocation |
2798 * <b>this</b>.<i>id</i>(<i>a<sub>1</sub></i>, ..., <i>a<sub>n</sub></i>, <i>x
<sub>n+1</sub></i> : | 2817 * <b>this</b>.<i>id</i>(<i>a<sub>1</sub></i>, ..., <i>a<sub>n</sub></i>, <i>x
<sub>n+1</sub></i> : |
2799 * <i>a<sub>n+1</sub></i>, ..., <i>x<sub>n+k</sub></i> : <i>a<sub>n+k</sub></i
>). | 2818 * <i>a<sub>n+1</sub></i>, ..., <i>x<sub>n+k</sub></i> : <i>a<sub>n+k</sub></i
>). |
2800 * | 2819 * |
2801 * @param methodName the name of the method that is undefined | 2820 * @param methodName the name of the method that is undefined |
2802 */ | 2821 */ |
2803 static const StaticTypeWarningCode UNDEFINED_FUNCTION = const StaticTypeWarnin
gCode.con1('UNDEFINED_FUNCTION', 15, "The function '%s' is not defined"); | 2822 static const StaticTypeWarningCode UNDEFINED_FUNCTION = const StaticTypeWarnin
gCode.con1('UNDEFINED_FUNCTION', 16, "The function '%s' is not defined"); |
2804 | 2823 |
2805 /** | 2824 /** |
2806 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
a static type | 2825 * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is
a static type |
2807 * warning if <i>T</i> does not have a getter named <i>m</i>. | 2826 * warning if <i>T</i> does not have a getter named <i>m</i>. |
2808 * | 2827 * |
2809 * @param getterName the name of the getter | 2828 * @param getterName the name of the getter |
2810 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for | 2829 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for |
2811 */ | 2830 */ |
2812 static const StaticTypeWarningCode UNDEFINED_GETTER = const StaticTypeWarningC
ode.con1('UNDEFINED_GETTER', 16, "There is no such getter '%s' in '%s'"); | 2831 static const StaticTypeWarningCode UNDEFINED_GETTER = const StaticTypeWarningC
ode.con1('UNDEFINED_GETTER', 17, "There is no such getter '%s' in '%s'"); |
2813 | 2832 |
2814 /** | 2833 /** |
2815 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type | 2834 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type |
2816 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. | 2835 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. |
2817 * | 2836 * |
2818 * @param methodName the name of the method that is undefined | 2837 * @param methodName the name of the method that is undefined |
2819 * @param typeName the resolved type name that the method lookup is happening
on | 2838 * @param typeName the resolved type name that the method lookup is happening
on |
2820 */ | 2839 */ |
2821 static const StaticTypeWarningCode UNDEFINED_METHOD = const StaticTypeWarningC
ode.con1('UNDEFINED_METHOD', 17, "The method '%s' is not defined for the class '
%s'"); | 2840 static const StaticTypeWarningCode UNDEFINED_METHOD = const StaticTypeWarningC
ode.con1('UNDEFINED_METHOD', 18, "The method '%s' is not defined for the class '
%s'"); |
2822 | 2841 |
2823 /** | 2842 /** |
2824 * 12.18 Assignment: Evaluation of an assignment of the form | 2843 * 12.18 Assignment: Evaluation of an assignment of the form |
2825 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is equiva
lent to the | 2844 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is equiva
lent to the |
2826 * evaluation of the expression (a, i, e){a.[]=(i, e); return e;} (<i>e<sub>1<
/sub></i>, | 2845 * evaluation of the expression (a, i, e){a.[]=(i, e); return e;} (<i>e<sub>1<
/sub></i>, |
2827 * <i>e<sub>2</sub></i>, <i>e<sub>2</sub></i>). | 2846 * <i>e<sub>2</sub></i>, <i>e<sub>2</sub></i>). |
2828 * | 2847 * |
2829 * 12.29 Assignable Expressions: An assignable expression of the form | 2848 * 12.29 Assignable Expressions: An assignable expression of the form |
2830 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] is evaluated as a method invocat
ion of the operator | 2849 * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] is evaluated as a method invocat
ion of the operator |
2831 * method [] on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>. | 2850 * method [] on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>. |
2832 * | 2851 * |
2833 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type | 2852 * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. I
t is a static type |
2834 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. | 2853 * warning if <i>T</i> does not have an accessible instance member named <i>m<
/i>. |
2835 * | 2854 * |
2836 * @param operator the name of the operator | 2855 * @param operator the name of the operator |
2837 * @param enclosingType the name of the enclosing type where the operator is b
eing looked for | 2856 * @param enclosingType the name of the enclosing type where the operator is b
eing looked for |
2838 */ | 2857 */ |
2839 static const StaticTypeWarningCode UNDEFINED_OPERATOR = const StaticTypeWarnin
gCode.con1('UNDEFINED_OPERATOR', 18, "There is no such operator '%s' in '%s'"); | 2858 static const StaticTypeWarningCode UNDEFINED_OPERATOR = const StaticTypeWarnin
gCode.con1('UNDEFINED_OPERATOR', 19, "There is no such operator '%s' in '%s'"); |
2840 | 2859 |
2841 /** | 2860 /** |
2842 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 2861 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
2843 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. | 2862 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. |
2844 * | 2863 * |
2845 * @param setterName the name of the setter | 2864 * @param setterName the name of the setter |
2846 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for | 2865 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for |
2847 * @see #INACCESSIBLE_SETTER | 2866 * @see #INACCESSIBLE_SETTER |
2848 */ | 2867 */ |
2849 static const StaticTypeWarningCode UNDEFINED_SETTER = const StaticTypeWarningC
ode.con1('UNDEFINED_SETTER', 19, "There is no such setter '%s' in '%s'"); | 2868 static const StaticTypeWarningCode UNDEFINED_SETTER = const StaticTypeWarningC
ode.con1('UNDEFINED_SETTER', 20, "There is no such setter '%s' in '%s'"); |
2850 | 2869 |
2851 /** | 2870 /** |
2852 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form | 2871 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form |
2853 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … | 2872 * <i>super.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n
+1</sub>, … |
2854 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static type warning if <i>S<
/i> does not have an | 2873 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static type warning if <i>S<
/i> does not have an |
2855 * accessible instance member named <i>m</i>. | 2874 * accessible instance member named <i>m</i>. |
2856 * | 2875 * |
2857 * @param methodName the name of the method that is undefined | 2876 * @param methodName the name of the method that is undefined |
2858 * @param typeName the resolved type name that the method lookup is happening
on | 2877 * @param typeName the resolved type name that the method lookup is happening
on |
2859 */ | 2878 */ |
2860 static const StaticTypeWarningCode UNDEFINED_SUPER_METHOD = const StaticTypeWa
rningCode.con1('UNDEFINED_SUPER_METHOD', 20, "There is no such method '%s' in '%
s'"); | 2879 static const StaticTypeWarningCode UNDEFINED_SUPER_METHOD = const StaticTypeWa
rningCode.con1('UNDEFINED_SUPER_METHOD', 21, "There is no such method '%s' in '%
s'"); |
2861 | 2880 |
2862 /** | 2881 /** |
2863 * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does n
ot have an | 2882 * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does n
ot have an |
2864 * accessible (3.2) instance member named <i>m</i>. | 2883 * accessible (3.2) instance member named <i>m</i>. |
2865 * | 2884 * |
2866 * This is a specialization of [INSTANCE_ACCESS_TO_STATIC_MEMBER] that is used
when we are | 2885 * This is a specialization of [INSTANCE_ACCESS_TO_STATIC_MEMBER] that is used
when we are |
2867 * able to find the name defined in a supertype. It exists to provide a more i
nformative error | 2886 * able to find the name defined in a supertype. It exists to provide a more i
nformative error |
2868 * message. | 2887 * message. |
2869 */ | 2888 */ |
2870 static const StaticTypeWarningCode UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_M
EMBER = const StaticTypeWarningCode.con1('UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STA
TIC_MEMBER', 21, "Static members from supertypes must be qualified by the name o
f the defining type"); | 2889 static const StaticTypeWarningCode UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_M
EMBER = const StaticTypeWarningCode.con1('UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STA
TIC_MEMBER', 22, "Static members from supertypes must be qualified by the name o
f the defining type"); |
2871 | 2890 |
2872 /** | 2891 /** |
2873 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a
generic type with | 2892 * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a
generic type with |
2874 * exactly <i>n</i> type parameters. | 2893 * exactly <i>n</i> type parameters. |
2875 * | 2894 * |
2876 * @param typeName the name of the type being referenced (<i>G</i>) | 2895 * @param typeName the name of the type being referenced (<i>G</i>) |
2877 * @param parameterCount the number of type parameters that were declared | 2896 * @param parameterCount the number of type parameters that were declared |
2878 * @param argumentCount the number of type arguments provided | 2897 * @param argumentCount the number of type arguments provided |
2879 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS | 2898 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS |
2880 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS | 2899 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS |
2881 */ | 2900 */ |
2882 static const StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = const Stat
icTypeWarningCode.con1('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 22, "The type '%s' is d
eclared with %d type parameters, but %d type arguments were given"); | 2901 static const StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = const Stat
icTypeWarningCode.con1('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 23, "The type '%s' is d
eclared with %d type parameters, but %d type arguments were given"); |
2883 | 2902 |
2884 static const List<StaticTypeWarningCode> values = const [ | 2903 static const List<StaticTypeWarningCode> values = const [ |
2885 EXPECTED_ONE_LIST_TYPE_ARGUMENTS, | 2904 EXPECTED_ONE_LIST_TYPE_ARGUMENTS, |
2886 EXPECTED_TWO_MAP_TYPE_ARGUMENTS, | 2905 EXPECTED_TWO_MAP_TYPE_ARGUMENTS, |
2887 INACCESSIBLE_SETTER, | 2906 INACCESSIBLE_SETTER, |
2888 INCONSISTENT_METHOD_INHERITANCE, | 2907 INCONSISTENT_METHOD_INHERITANCE, |
2889 INSTANCE_ACCESS_TO_STATIC_MEMBER, | 2908 INSTANCE_ACCESS_TO_STATIC_MEMBER, |
2890 INVALID_ASSIGNMENT, | 2909 INVALID_ASSIGNMENT, |
2891 INVOCATION_OF_NON_FUNCTION, | 2910 INVOCATION_OF_NON_FUNCTION, |
2892 INVOCATION_OF_NON_FUNCTION_EXPRESSION, | 2911 INVOCATION_OF_NON_FUNCTION_EXPRESSION, |
2893 NON_BOOL_CONDITION, | 2912 NON_BOOL_CONDITION, |
2894 NON_BOOL_EXPRESSION, | 2913 NON_BOOL_EXPRESSION, |
2895 NON_BOOL_NEGATION_EXPRESSION, | 2914 NON_BOOL_NEGATION_EXPRESSION, |
| 2915 NON_BOOL_OPERAND, |
2896 NON_TYPE_AS_TYPE_ARGUMENT, | 2916 NON_TYPE_AS_TYPE_ARGUMENT, |
2897 RETURN_OF_INVALID_TYPE, | 2917 RETURN_OF_INVALID_TYPE, |
2898 TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, | 2918 TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, |
2899 TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, | 2919 TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, |
2900 UNDEFINED_FUNCTION, | 2920 UNDEFINED_FUNCTION, |
2901 UNDEFINED_GETTER, | 2921 UNDEFINED_GETTER, |
2902 UNDEFINED_METHOD, | 2922 UNDEFINED_METHOD, |
2903 UNDEFINED_OPERATOR, | 2923 UNDEFINED_OPERATOR, |
2904 UNDEFINED_SETTER, | 2924 UNDEFINED_SETTER, |
2905 UNDEFINED_SUPER_METHOD, | 2925 UNDEFINED_SUPER_METHOD, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2998 static const StaticWarningCode ASSIGNMENT_TO_CONST = const StaticWarningCode.c
on1('ASSIGNMENT_TO_CONST', 2, "Constant variables cannot be assigned a value"); | 3018 static const StaticWarningCode ASSIGNMENT_TO_CONST = const StaticWarningCode.c
on1('ASSIGNMENT_TO_CONST', 2, "Constant variables cannot be assigned a value"); |
2999 | 3019 |
3000 /** | 3020 /** |
3001 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError | 3021 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError |
3002 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a | 3022 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a |
3003 * static warning for the same reason. | 3023 * static warning for the same reason. |
3004 */ | 3024 */ |
3005 static const StaticWarningCode ASSIGNMENT_TO_FINAL = const StaticWarningCode.c
on1('ASSIGNMENT_TO_FINAL', 3, "'%s' cannot be used as a setter, it is final"); | 3025 static const StaticWarningCode ASSIGNMENT_TO_FINAL = const StaticWarningCode.c
on1('ASSIGNMENT_TO_FINAL', 3, "'%s' cannot be used as a setter, it is final"); |
3006 | 3026 |
3007 /** | 3027 /** |
| 3028 * 5 Variables: Attempting to assign to a final variable elsewhere will cause
a NoSuchMethodError |
| 3029 * to be thrown, because no setter is defined for it. The assignment will also
give rise to a |
| 3030 * static warning for the same reason. |
| 3031 */ |
| 3032 static const StaticWarningCode ASSIGNMENT_TO_FINAL_NO_SETTER = const StaticWar
ningCode.con1('ASSIGNMENT_TO_FINAL_NO_SETTER', 4, "No setter named '%s' in class
'%s'"); |
| 3033 |
| 3034 /** |
3008 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs | 3035 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs |
3009 * inside a top level or static function (be it function, method, getter, or s
etter) or variable | 3036 * inside a top level or static function (be it function, method, getter, or s
etter) or variable |
3010 * initializer and there is neither a local variable declaration with name <i>
v</i> nor setter | 3037 * initializer and there is neither a local variable declaration with name <i>
v</i> nor setter |
3011 * declaration with name <i>v=</i> in the lexical scope enclosing the assignme
nt. | 3038 * declaration with name <i>v=</i> in the lexical scope enclosing the assignme
nt. |
3012 */ | 3039 */ |
3013 static const StaticWarningCode ASSIGNMENT_TO_FUNCTION = const StaticWarningCod
e.con1('ASSIGNMENT_TO_FUNCTION', 4, "Functions cannot be assigned a value"); | 3040 static const StaticWarningCode ASSIGNMENT_TO_FUNCTION = const StaticWarningCod
e.con1('ASSIGNMENT_TO_FUNCTION', 5, "Functions cannot be assigned a value"); |
3014 | 3041 |
3015 /** | 3042 /** |
3016 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type | 3043 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
It is a static type |
3017 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. | 3044 * warning if <i>T</i> does not have an accessible instance setter named <i>v=
</i>. |
3018 */ | 3045 */ |
3019 static const StaticWarningCode ASSIGNMENT_TO_METHOD = const StaticWarningCode.
con1('ASSIGNMENT_TO_METHOD', 5, "Methods cannot be assigned a value"); | 3046 static const StaticWarningCode ASSIGNMENT_TO_METHOD = const StaticWarningCode.
con1('ASSIGNMENT_TO_METHOD', 6, "Methods cannot be assigned a value"); |
3020 | 3047 |
3021 /** | 3048 /** |
3022 * 13.9 Switch: It is a static warning if the last statement of the statement
sequence | 3049 * 13.9 Switch: It is a static warning if the last statement of the statement
sequence |
3023 * <i>s<sub>k</sub></i> is not a break, continue, return or throw statement. | 3050 * <i>s<sub>k</sub></i> is not a break, continue, return or throw statement. |
3024 */ | 3051 */ |
3025 static const StaticWarningCode CASE_BLOCK_NOT_TERMINATED = const StaticWarning
Code.con1('CASE_BLOCK_NOT_TERMINATED', 6, "The last statement of the 'case' shou
ld be 'break', 'continue', 'return' or 'throw'"); | 3052 static const StaticWarningCode CASE_BLOCK_NOT_TERMINATED = const StaticWarning
Code.con1('CASE_BLOCK_NOT_TERMINATED', 7, "The last statement of the 'case' shou
ld be 'break', 'continue', 'return' or 'throw'"); |
3026 | 3053 |
3027 /** | 3054 /** |
3028 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the | 3055 * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type
available in the |
3029 * current lexical scope. | 3056 * current lexical scope. |
3030 */ | 3057 */ |
3031 static const StaticWarningCode CAST_TO_NON_TYPE = const StaticWarningCode.con1
('CAST_TO_NON_TYPE', 7, "The name '%s' is not a type and cannot be used in an 'a
s' expression"); | 3058 static const StaticWarningCode CAST_TO_NON_TYPE = const StaticWarningCode.con1
('CAST_TO_NON_TYPE', 8, "The name '%s' is not a type and cannot be used in an 'a
s' expression"); |
3032 | 3059 |
3033 /** | 3060 /** |
3034 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 3061 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
3035 * inherited in a concrete class. | 3062 * inherited in a concrete class. |
3036 */ | 3063 */ |
3037 static const StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = const Sta
ticWarningCode.con1('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 8, "'%s' must have a
method body because '%s' is not abstract"); | 3064 static const StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = const Sta
ticWarningCode.con1('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 9, "'%s' must have a
method body because '%s' is not abstract"); |
3038 | 3065 |
3039 /** | 3066 /** |
3040 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> would be | 3067 * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i
>N</i> would be |
3041 * introduced into the top level scope of <i>L</i> by an import from a library
whose URI begins | 3068 * introduced into the top level scope of <i>L</i> by an import from a library
whose URI begins |
3042 * with <i>dart:</i> and an import from a library whose URI does not begin wit
h <i>dart:</i>: | 3069 * with <i>dart:</i> and an import from a library whose URI does not begin wit
h <i>dart:</i>: |
3043 * * The import from <i>dart:</i> is implicitly extended by a hide N clause. | 3070 * * The import from <i>dart:</i> is implicitly extended by a hide N clause. |
3044 * * A static warning is issued. | 3071 * * A static warning is issued. |
3045 * | 3072 * |
3046 * @param ambiguousName the ambiguous name | 3073 * @param ambiguousName the ambiguous name |
3047 * @param sdkLibraryName the name of the dart: library that the element is fou
nd | 3074 * @param sdkLibraryName the name of the dart: library that the element is fou
nd |
3048 * @param otherLibraryName the name of the non-dart: library that the element
is found | 3075 * @param otherLibraryName the name of the non-dart: library that the element
is found |
3049 */ | 3076 */ |
3050 static const StaticWarningCode CONFLICTING_DART_IMPORT = const StaticWarningCo
de.con1('CONFLICTING_DART_IMPORT', 9, "Element '%s' from SDK library '%s' is imp
licitly hidden by '%s'"); | 3077 static const StaticWarningCode CONFLICTING_DART_IMPORT = const StaticWarningCo
de.con1('CONFLICTING_DART_IMPORT', 10, "Element '%s' from SDK library '%s' is im
plicitly hidden by '%s'"); |
3051 | 3078 |
3052 /** | 3079 /** |
3053 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named | 3080 * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instanc
e getter named |
3054 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a | 3081 * <i>v</i> and an accessible static member named <i>v</i> or <i>v=</i> is dec
lared in a |
3055 * superclass of <i>C</i>. | 3082 * superclass of <i>C</i>. |
3056 * | 3083 * |
3057 * @param superName the name of the super class declaring a static member | 3084 * @param superName the name of the super class declaring a static member |
3058 */ | 3085 */ |
3059 static const StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB
ER = const StaticWarningCode.con1('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_ME
MBER', 10, "Superclass '%s' declares static member with the same name"); | 3086 static const StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMB
ER = const StaticWarningCode.con1('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_ME
MBER', 11, "Superclass '%s' declares static member with the same name"); |
3060 | 3087 |
3061 /** | 3088 /** |
3062 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method | 3089 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method |
3063 * named <i>n</i> and has a setter named <i>n=</i>. | 3090 * named <i>n</i> and has a setter named <i>n=</i>. |
3064 */ | 3091 */ |
3065 static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER = const Stat
icWarningCode.con1('CONFLICTING_INSTANCE_METHOD_SETTER', 11, "Class '%s' declare
s instance method '%s', but also has a setter with the same name from '%s'"); | 3092 static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER = const Stat
icWarningCode.con1('CONFLICTING_INSTANCE_METHOD_SETTER', 12, "Class '%s' declare
s instance method '%s', but also has a setter with the same name from '%s'"); |
3066 | 3093 |
3067 /** | 3094 /** |
3068 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method | 3095 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method |
3069 * named <i>n</i> and has a setter named <i>n=</i>. | 3096 * named <i>n</i> and has a setter named <i>n=</i>. |
3070 */ | 3097 */ |
3071 static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER2 = const Sta
ticWarningCode.con1('CONFLICTING_INSTANCE_METHOD_SETTER2', 12, "Class '%s' decla
res the setter '%s', but also has an instance method in the same class"); | 3098 static const StaticWarningCode CONFLICTING_INSTANCE_METHOD_SETTER2 = const Sta
ticWarningCode.con1('CONFLICTING_INSTANCE_METHOD_SETTER2', 13, "Class '%s' decla
res the setter '%s', but also has an instance method in the same class"); |
3072 | 3099 |
3073 /** | 3100 /** |
3074 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named | 3101 * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instanc
e setter named |
3075 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a | 3102 * <i>v=</i> and an accessible static member named <i>v=</i> or <i>v</i> is de
clared in a |
3076 * superclass of <i>C</i>. | 3103 * superclass of <i>C</i>. |
3077 * | 3104 * |
3078 * @param superName the name of the super class declaring a static member | 3105 * @param superName the name of the super class declaring a static member |
3079 */ | 3106 */ |
3080 static const StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB
ER = const StaticWarningCode.con1('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_ME
MBER', 13, "Superclass '%s' declares static member with the same name"); | 3107 static const StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMB
ER = const StaticWarningCode.con1('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_ME
MBER', 14, "Superclass '%s' declares static member with the same name"); |
3081 | 3108 |
3082 /** | 3109 /** |
3083 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also | 3110 * 7.2 Getters: It is a static warning if a class declares a static getter nam
ed <i>v</i> and also |
3084 * has a non-static setter named <i>v=</i>. | 3111 * has a non-static setter named <i>v=</i>. |
3085 */ | 3112 */ |
3086 static const StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER =
const StaticWarningCode.con1('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 1
4, "Class '%s' declares non-static setter with the same name"); | 3113 static const StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER =
const StaticWarningCode.con1('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 1
5, "Class '%s' declares non-static setter with the same name"); |
3087 | 3114 |
3088 /** | 3115 /** |
3089 * 7.3 Setters: It is a static warning if a class declares a static setter nam
ed <i>v=</i> and | 3116 * 7.3 Setters: It is a static warning if a class declares a static setter nam
ed <i>v=</i> and |
3090 * also has a non-static member named <i>v</i>. | 3117 * also has a non-static member named <i>v</i>. |
3091 */ | 3118 */ |
3092 static const StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER =
const StaticWarningCode.con1('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 1
5, "Class '%s' declares non-static member with the same name"); | 3119 static const StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER =
const StaticWarningCode.con1('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 1
6, "Class '%s' declares non-static member with the same name"); |
3093 | 3120 |
3094 /** | 3121 /** |
3095 * 12.11.2 Const: Given an instance creation expression of the form <i>const q
(a<sub>1</sub>, | 3122 * 12.11.2 Const: Given an instance creation expression of the form <i>const q
(a<sub>1</sub>, |
3096 * … a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const
ructor of an | 3123 * … a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the const
ructor of an |
3097 * abstract class but <i>q</i> is not a factory constructor. | 3124 * abstract class but <i>q</i> is not a factory constructor. |
3098 */ | 3125 */ |
3099 static const StaticWarningCode CONST_WITH_ABSTRACT_CLASS = const StaticWarning
Code.con1('CONST_WITH_ABSTRACT_CLASS', 16, "Abstract classes cannot be created w
ith a 'const' expression"); | 3126 static const StaticWarningCode CONST_WITH_ABSTRACT_CLASS = const StaticWarning
Code.con1('CONST_WITH_ABSTRACT_CLASS', 17, "Abstract classes cannot be created w
ith a 'const' expression"); |
3100 | 3127 |
3101 /** | 3128 /** |
3102 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. | 3129 * 12.7 Maps: It is a static warning if the values of any two keys in a map li
teral are equal. |
3103 */ | 3130 */ |
3104 static const StaticWarningCode EQUAL_KEYS_IN_MAP = const StaticWarningCode.con
1('EQUAL_KEYS_IN_MAP', 17, "Keys in a map cannot be equal"); | 3131 static const StaticWarningCode EQUAL_KEYS_IN_MAP = const StaticWarningCode.con
1('EQUAL_KEYS_IN_MAP', 18, "Keys in a map cannot be equal"); |
3105 | 3132 |
3106 /** | 3133 /** |
3107 * 14.2 Exports: It is a static warning to export two different libraries with
the same name. | 3134 * 14.2 Exports: It is a static warning to export two different libraries with
the same name. |
3108 * | 3135 * |
3109 * @param uri1 the uri pointing to a first library | 3136 * @param uri1 the uri pointing to a first library |
3110 * @param uri2 the uri pointing to a second library | 3137 * @param uri2 the uri pointing to a second library |
3111 * @param name the shared name of the exported libraries | 3138 * @param name the shared name of the exported libraries |
3112 */ | 3139 */ |
3113 static const StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = const StaticWa
rningCode.con1('EXPORT_DUPLICATED_LIBRARY_NAME', 18, "The exported libraries '%s
' and '%s' should not have the same name '%s'"); | 3140 static const StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = const StaticWa
rningCode.con1('EXPORT_DUPLICATED_LIBRARY_NAME', 19, "The exported libraries '%s
' and '%s' should not have the same name '%s'"); |
3114 | 3141 |
3115 /** | 3142 /** |
3116 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 3143 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
3117 * n</i>. | 3144 * n</i>. |
3118 * | 3145 * |
3119 * @param requiredCount the maximum number of positional arguments | 3146 * @param requiredCount the maximum number of positional arguments |
3120 * @param argumentCount the actual number of positional arguments given | 3147 * @param argumentCount the actual number of positional arguments given |
3121 * @see #NOT_ENOUGH_REQUIRED_ARGUMENTS | 3148 * @see #NOT_ENOUGH_REQUIRED_ARGUMENTS |
3122 */ | 3149 */ |
3123 static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = const StaticWarnin
gCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 19, "%d positional arguments expected,
but %d found"); | 3150 static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = const StaticWarnin
gCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 20, "%d positional arguments expected,
but %d found"); |
3124 | 3151 |
3125 /** | 3152 /** |
3126 * 5. Variables: It is a static warning if a final instance variable that has
been initialized at | 3153 * 5. Variables: It is a static warning if a final instance variable that has
been initialized at |
3127 * its point of declaration is also initialized in a constructor. | 3154 * its point of declaration is also initialized in a constructor. |
3128 */ | 3155 */ |
3129 static const StaticWarningCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N = const StaticWarningCode.con1('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATI
ON', 20, "Values cannot be set in the constructor if they are final, and have al
ready been set"); | 3156 static const StaticWarningCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATIO
N = const StaticWarningCode.con1('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATI
ON', 21, "Values cannot be set in the constructor if they are final, and have al
ready been set"); |
3130 | 3157 |
3131 /** | 3158 /** |
3132 * 5. Variables: It is a static warning if a final instance variable that has
been initialized at | 3159 * 5. Variables: It is a static warning if a final instance variable that has
been initialized at |
3133 * its point of declaration is also initialized in a constructor. | 3160 * its point of declaration is also initialized in a constructor. |
3134 * | 3161 * |
3135 * @param name the name of the field in question | 3162 * @param name the name of the field in question |
3136 */ | 3163 */ |
3137 static const StaticWarningCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R = const StaticWarningCode.con1('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCT
OR', 21, "'%s' is final and was given a value when it was declared, so it cannot
be set to a new value"); | 3164 static const StaticWarningCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTO
R = const StaticWarningCode.con1('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCT
OR', 22, "'%s' is final and was given a value when it was declared, so it cannot
be set to a new value"); |
3138 | 3165 |
3139 /** | 3166 /** |
3140 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t
his</b>.<i>v</i> = | 3167 * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>t
his</b>.<i>v</i> = |
3141 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t
o an object | 3168 * <i>e</i> proceeds as follows: First, the expression <i>e</i> is evaluated t
o an object |
3142 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi
s is bound to | 3169 * <i>o</i>. Then, the instance variable <i>v</i> of the object denoted by thi
s is bound to |
3143 * <i>o</i>. | 3170 * <i>o</i>. |
3144 * | 3171 * |
3145 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 3172 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
3146 * <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 <= | 3173 * <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 <= |
3147 * 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>. | 3174 * 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>. |
3148 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 3175 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
3149 * j <= m</i>. | 3176 * j <= m</i>. |
3150 * | 3177 * |
3151 * @param initializerType the name of the type of the initializer expression | 3178 * @param initializerType the name of the type of the initializer expression |
3152 * @param fieldType the name of the type of the field | 3179 * @param fieldType the name of the type of the field |
3153 */ | 3180 */ |
3154 static const StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = const Static
WarningCode.con1('FIELD_INITIALIZER_NOT_ASSIGNABLE', 22, "The initializer type '
%s' cannot be assigned to the field type '%s'"); | 3181 static const StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = const Static
WarningCode.con1('FIELD_INITIALIZER_NOT_ASSIGNABLE', 23, "The initializer type '
%s' cannot be assigned to the field type '%s'"); |
3155 | 3182 |
3156 /** | 3183 /** |
3157 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a | 3184 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.
id</i>. It is a |
3158 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. | 3185 * static warning if the static type of <i>id</i> is not assignable to <i>T<su
b>id</sub></i>. |
3159 * | 3186 * |
3160 * @param parameterType the name of the type of the field formal parameter | 3187 * @param parameterType the name of the type of the field formal parameter |
3161 * @param fieldType the name of the type of the field | 3188 * @param fieldType the name of the type of the field |
3162 */ | 3189 */ |
3163 static const StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = cons
t StaticWarningCode.con1('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 23, "The pa
rameter type '%s' is incompatable with the field type '%s'"); | 3190 static const StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = cons
t StaticWarningCode.con1('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 24, "The pa
rameter type '%s' is incompatable with the field type '%s'"); |
3164 | 3191 |
3165 /** | 3192 /** |
3166 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final | 3193 * 5 Variables: It is a static warning if a library, static or local variable
<i>v</i> is final |
3167 * and <i>v</i> is not initialized at its point of declaration. | 3194 * and <i>v</i> is not initialized at its point of declaration. |
3168 * | 3195 * |
3169 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declar
ed in the | 3196 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declar
ed in the |
3170 * immediately enclosing class must have an initializer in <i>k</i>'s initiali
zer list unless it | 3197 * immediately enclosing class must have an initializer in <i>k</i>'s initiali
zer list unless it |
3171 * has already been initialized by one of the following means: | 3198 * has already been initialized by one of the following means: |
3172 * * Initialization at the declaration of <i>f</i>. | 3199 * * Initialization at the declaration of <i>f</i>. |
3173 * * Initialization by means of an initializing formal of <i>k</i>. | 3200 * * Initialization by means of an initializing formal of <i>k</i>. |
3174 * or a static warning occurs. | 3201 * or a static warning occurs. |
3175 * | 3202 * |
3176 * @param name the name of the uninitialized final variable | 3203 * @param name the name of the uninitialized final variable |
3177 */ | 3204 */ |
3178 static const StaticWarningCode FINAL_NOT_INITIALIZED = const StaticWarningCode
.con1('FINAL_NOT_INITIALIZED', 24, "The final variable '%s' must be initialized"
); | 3205 static const StaticWarningCode FINAL_NOT_INITIALIZED = const StaticWarningCode
.con1('FINAL_NOT_INITIALIZED', 25, "The final variable '%s' must be initialized"
); |
3179 | 3206 |
3180 /** | 3207 /** |
3181 * 15.5 Function Types: It is a static warning if a concrete class implements
Function and does | 3208 * 15.5 Function Types: It is a static warning if a concrete class implements
Function and does |
3182 * not have a concrete method named call(). | 3209 * not have a concrete method named call(). |
3183 */ | 3210 */ |
3184 static const StaticWarningCode FUNCTION_WITHOUT_CALL = const StaticWarningCode
.con1('FUNCTION_WITHOUT_CALL', 25, "Concrete classes that implement Function mus
t implement the method call()"); | 3211 static const StaticWarningCode FUNCTION_WITHOUT_CALL = const StaticWarningCode
.con1('FUNCTION_WITHOUT_CALL', 26, "Concrete classes that implement Function mus
t implement the method call()"); |
3185 | 3212 |
3186 /** | 3213 /** |
3187 * 14.1 Imports: It is a static warning to import two different libraries with
the same name. | 3214 * 14.1 Imports: It is a static warning to import two different libraries with
the same name. |
3188 * | 3215 * |
3189 * @param uri1 the uri pointing to a first library | 3216 * @param uri1 the uri pointing to a first library |
3190 * @param uri2 the uri pointing to a second library | 3217 * @param uri2 the uri pointing to a second library |
3191 * @param name the shared name of the imported libraries | 3218 * @param name the shared name of the imported libraries |
3192 */ | 3219 */ |
3193 static const StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = const StaticWa
rningCode.con1('IMPORT_DUPLICATED_LIBRARY_NAME', 26, "The imported libraries '%s
' and '%s' should not have the same name '%s'"); | 3220 static const StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = const StaticWa
rningCode.con1('IMPORT_DUPLICATED_LIBRARY_NAME', 27, "The imported libraries '%s
' and '%s' should not have the same name '%s'"); |
3194 | 3221 |
3195 /** | 3222 /** |
3196 * 14.1 Imports: It is a static warning if the specified URI of a deferred imp
ort does not refer | 3223 * 14.1 Imports: It is a static warning if the specified URI of a deferred imp
ort does not refer |
3197 * to a library declaration. | 3224 * to a library declaration. |
3198 * | 3225 * |
3199 * @param uri the uri pointing to a non-library declaration | 3226 * @param uri the uri pointing to a non-library declaration |
3200 * @see CompileTimeErrorCode#IMPORT_OF_NON_LIBRARY | 3227 * @see CompileTimeErrorCode#IMPORT_OF_NON_LIBRARY |
3201 */ | 3228 */ |
3202 static const StaticWarningCode IMPORT_OF_NON_LIBRARY = const StaticWarningCode
.con1('IMPORT_OF_NON_LIBRARY', 27, "The imported library '%s' must not have a pa
rt-of directive"); | 3229 static const StaticWarningCode IMPORT_OF_NON_LIBRARY = const StaticWarningCode
.con1('IMPORT_OF_NON_LIBRARY', 28, "The imported library '%s' must not have a pa
rt-of directive"); |
3203 | 3230 |
3204 /** | 3231 /** |
3205 * 8.1.1 Inheritance and Overriding: However, if the above rules would cause m
ultiple members | 3232 * 8.1.1 Inheritance and Overriding: However, if the above rules would cause m
ultiple members |
3206 * <i>m<sub>1</sub>, …, m<sub>k</sub></i> with the same name <i>n</i> t
hat would be | 3233 * <i>m<sub>1</sub>, …, m<sub>k</sub></i> with the same name <i>n</i> t
hat would be |
3207 * inherited (because identically named members existed in several superinterf
aces) then at most | 3234 * inherited (because identically named members existed in several superinterf
aces) then at most |
3208 * one member is inherited. | 3235 * one member is inherited. |
3209 * | 3236 * |
3210 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i> are gett
ers none of the | 3237 * If some but not all of the <i>m<sub>i</sub>, 1 <= i <= k</i> are gett
ers none of the |
3211 * <i>m<sub>i</sub></i> are inherited, and a static warning is issued. | 3238 * <i>m<sub>i</sub></i> are inherited, and a static warning is issued. |
3212 */ | 3239 */ |
3213 static const StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH
OD = const StaticWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_ME
THOD', 28, "'%s' is inherited as a getter and also a method"); | 3240 static const StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METH
OD = const StaticWarningCode.con1('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_ME
THOD', 29, "'%s' is inherited as a getter and also a method"); |
3214 | 3241 |
3215 /** | 3242 /** |
3216 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method | 3243 * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares a
n instance method |
3217 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of | 3244 * named <i>n</i> and an accessible static member named <i>n</i> is declared i
n a superclass of |
3218 * <i>C</i>. | 3245 * <i>C</i>. |
3219 * | 3246 * |
3220 * @param memberName the name of the member with the name conflict | 3247 * @param memberName the name of the member with the name conflict |
3221 * @param superclassName the name of the enclosing class that has the static m
ember | 3248 * @param superclassName the name of the enclosing class that has the static m
ember |
3222 */ | 3249 */ |
3223 static const StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = const StaticWarningCode.con1('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCL
ASS_STATIC', 29, "'%s' collides with a static member in the superclass '%s'"); | 3250 static const StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_S
TATIC = const StaticWarningCode.con1('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCL
ASS_STATIC', 30, "'%s' collides with a static member in the superclass '%s'"); |
3224 | 3251 |
3225 /** | 3252 /** |
3226 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the | 3253 * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a gette
r <i>m2</i> and the |
3227 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 3254 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
3228 * | 3255 * |
3229 * @param actualReturnTypeName the name of the expected return type | 3256 * @param actualReturnTypeName the name of the expected return type |
3230 * @param expectedReturnType the name of the actual return type, not assignabl
e to the | 3257 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
3231 * actualReturnTypeName | 3258 * actualReturnTypeName |
3232 * @param className the name of the class where the overridden getter is decla
red | 3259 * @param className the name of the class where the overridden getter is decla
red |
3233 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE | 3260 * @see #INVALID_METHOD_OVERRIDE_RETURN_TYPE |
3234 */ | 3261 */ |
3235 static const StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = const Sta
ticWarningCode.con1('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 30, "The return type
'%s' is not assignable to '%s' as required by the getter it is overriding from '
%s'"); | 3262 static const StaticWarningCode INVALID_GETTER_OVERRIDE_RETURN_TYPE = const Sta
ticWarningCode.con1('INVALID_GETTER_OVERRIDE_RETURN_TYPE', 31, "The return type
'%s' is not assignable to '%s' as required by the getter it is overriding from '
%s'"); |
3236 | 3263 |
3237 /** | 3264 /** |
3238 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 3265 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
3239 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 3266 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
3240 * | 3267 * |
3241 * @param actualParamTypeName the name of the expected parameter type | 3268 * @param actualParamTypeName the name of the expected parameter type |
3242 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 3269 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
3243 * actualParamTypeName | 3270 * actualParamTypeName |
3244 * @param className the name of the class where the overridden method is decla
red | 3271 * @param className the name of the class where the overridden method is decla
red |
3245 */ | 3272 */ |
3246 static const StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = cons
t StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 31, "The pa
rameter type '%s' is not assignable to '%s' as required by the method it is over
riding from '%s'"); | 3273 static const StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = cons
t StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 32, "The pa
rameter type '%s' is not assignable to '%s' as required by the method it is over
riding from '%s'"); |
3247 | 3274 |
3248 /** | 3275 /** |
3249 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 3276 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
3250 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 3277 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
3251 * | 3278 * |
3252 * @param actualParamTypeName the name of the expected parameter type | 3279 * @param actualParamTypeName the name of the expected parameter type |
3253 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 3280 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
3254 * actualParamTypeName | 3281 * actualParamTypeName |
3255 * @param className the name of the class where the overridden method is decla
red | 3282 * @param className the name of the class where the overridden method is decla
red |
3256 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE | 3283 * @see #INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE |
3257 */ | 3284 */ |
3258 static const StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = con
st StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 32, "The
parameter type '%s' is not assignable to '%s' as required by the method it is ov
erriding from '%s'"); | 3285 static const StaticWarningCode INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE = con
st StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE', 33, "The
parameter type '%s' is not assignable to '%s' as required by the method it is ov
erriding from '%s'"); |
3259 | 3286 |
3260 /** | 3287 /** |
3261 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 3288 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
3262 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 3289 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
3263 * | 3290 * |
3264 * @param actualParamTypeName the name of the expected parameter type | 3291 * @param actualParamTypeName the name of the expected parameter type |
3265 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 3292 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
3266 * actualParamTypeName | 3293 * actualParamTypeName |
3267 * @param className the name of the class where the overridden method is decla
red | 3294 * @param className the name of the class where the overridden method is decla
red |
3268 */ | 3295 */ |
3269 static const StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = c
onst StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 33, "
The parameter type '%s' is not assignable to '%s' as required by the method it i
s overriding from '%s'"); | 3296 static const StaticWarningCode INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE = c
onst StaticWarningCode.con1('INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE', 34, "
The parameter type '%s' is not assignable to '%s' as required by the method it i
s overriding from '%s'"); |
3270 | 3297 |
3271 /** | 3298 /** |
3272 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 3299 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
3273 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. | 3300 * instance method <i>m2</i> and the type of <i>m1</i> is not a subtype of the
type of <i>m2</i>. |
3274 * | 3301 * |
3275 * @param actualReturnTypeName the name of the expected return type | 3302 * @param actualReturnTypeName the name of the expected return type |
3276 * @param expectedReturnType the name of the actual return type, not assignabl
e to the | 3303 * @param expectedReturnType the name of the actual return type, not assignabl
e to the |
3277 * actualReturnTypeName | 3304 * actualReturnTypeName |
3278 * @param className the name of the class where the overridden method is decla
red | 3305 * @param className the name of the class where the overridden method is decla
red |
3279 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE | 3306 * @see #INVALID_GETTER_OVERRIDE_RETURN_TYPE |
3280 */ | 3307 */ |
3281 static const StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = const Sta
ticWarningCode.con1('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 34, "The return type
'%s' is not assignable to '%s' as required by the method it is overriding from '
%s'"); | 3308 static const StaticWarningCode INVALID_METHOD_OVERRIDE_RETURN_TYPE = const Sta
ticWarningCode.con1('INVALID_METHOD_OVERRIDE_RETURN_TYPE', 35, "The return type
'%s' is not assignable to '%s' as required by the method it is overriding from '
%s'"); |
3282 | 3309 |
3283 /** | 3310 /** |
3284 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 3311 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
3285 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 3312 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
3286 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 3313 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
3287 * for <i>p</i>. | 3314 * for <i>p</i>. |
3288 */ | 3315 */ |
3289 static const StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED
= const StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED
', 35, "Parameters cannot override default values, this method overrides '%s.%s'
where '%s' has a different value"); | 3316 static const StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED
= const StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED
', 36, "Parameters cannot override default values, this method overrides '%s.%s'
where '%s' has a different value"); |
3290 | 3317 |
3291 /** | 3318 /** |
3292 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 3319 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
3293 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for | 3320 * instance member <i>m2</i>, the signature of <i>m2</i> explicitly specifies
a default value for |
3294 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value | 3321 * a formal parameter <i>p</i> and the signature of <i>m1</i> specifies a diff
erent default value |
3295 * for <i>p</i>. | 3322 * for <i>p</i>. |
3296 */ | 3323 */ |
3297 static const StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT
IONAL = const StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_
POSITIONAL', 36, "Parameters cannot override default values, this method overrid
es '%s.%s' where this positional parameter has a different value"); | 3324 static const StaticWarningCode INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSIT
IONAL = const StaticWarningCode.con1('INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_
POSITIONAL', 37, "Parameters cannot override default values, this method overrid
es '%s.%s' where this positional parameter has a different value"); |
3298 | 3325 |
3299 /** | 3326 /** |
3300 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 3327 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
3301 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para
meters declared by | 3328 * instance member <i>m2</i> and <i>m1</i> does not declare all the named para
meters declared by |
3302 * <i>m2</i>. | 3329 * <i>m2</i>. |
3303 * | 3330 * |
3304 * @param paramCount the number of named parameters in the overridden member | 3331 * @param paramCount the number of named parameters in the overridden member |
3305 * @param className the name of the class from the overridden method | 3332 * @param className the name of the class from the overridden method |
3306 */ | 3333 */ |
3307 static const StaticWarningCode INVALID_OVERRIDE_NAMED = const StaticWarningCod
e.con1('INVALID_OVERRIDE_NAMED', 37, "Missing the named parameter '%s' to match
the overridden method from '%s'"); | 3334 static const StaticWarningCode INVALID_OVERRIDE_NAMED = const StaticWarningCod
e.con1('INVALID_OVERRIDE_NAMED', 38, "Missing the named parameter '%s' to match
the overridden method from '%s'"); |
3308 | 3335 |
3309 /** | 3336 /** |
3310 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 3337 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
3311 * instance member <i>m2</i> and <i>m1</i> has fewer positional parameters tha
n <i>m2</i>. | 3338 * instance member <i>m2</i> and <i>m1</i> has fewer positional parameters tha
n <i>m2</i>. |
3312 * | 3339 * |
3313 * @param paramCount the number of positional parameters in the overridden mem
ber | 3340 * @param paramCount the number of positional parameters in the overridden mem
ber |
3314 * @param className the name of the class from the overridden method | 3341 * @param className the name of the class from the overridden method |
3315 */ | 3342 */ |
3316 static const StaticWarningCode INVALID_OVERRIDE_POSITIONAL = const StaticWarni
ngCode.con1('INVALID_OVERRIDE_POSITIONAL', 38, "Must have at least %d parameters
to match the overridden method from '%s'"); | 3343 static const StaticWarningCode INVALID_OVERRIDE_POSITIONAL = const StaticWarni
ngCode.con1('INVALID_OVERRIDE_POSITIONAL', 39, "Must have at least %d parameters
to match the overridden method from '%s'"); |
3317 | 3344 |
3318 /** | 3345 /** |
3319 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an | 3346 * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i
> overrides an |
3320 * instance member <i>m2</i> and <i>m1</i> has a greater number of required pa
rameters than | 3347 * instance member <i>m2</i> and <i>m1</i> has a greater number of required pa
rameters than |
3321 * <i>m2</i>. | 3348 * <i>m2</i>. |
3322 * | 3349 * |
3323 * @param paramCount the number of required parameters in the overridden membe
r | 3350 * @param paramCount the number of required parameters in the overridden membe
r |
3324 * @param className the name of the class from the overridden method | 3351 * @param className the name of the class from the overridden method |
3325 */ | 3352 */ |
3326 static const StaticWarningCode INVALID_OVERRIDE_REQUIRED = const StaticWarning
Code.con1('INVALID_OVERRIDE_REQUIRED', 39, "Must have %d required parameters or
less to match the overridden method from '%s'"); | 3353 static const StaticWarningCode INVALID_OVERRIDE_REQUIRED = const StaticWarning
Code.con1('INVALID_OVERRIDE_REQUIRED', 40, "Must have %d required parameters or
less to match the overridden method from '%s'"); |
3327 | 3354 |
3328 /** | 3355 /** |
3329 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the | 3356 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a sette
r <i>m2</i> and the |
3330 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. | 3357 * type of <i>m1</i> is not a subtype of the type of <i>m2</i>. |
3331 * | 3358 * |
3332 * @param actualParamTypeName the name of the expected parameter type | 3359 * @param actualParamTypeName the name of the expected parameter type |
3333 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the | 3360 * @param expectedParamType the name of the actual parameter type, not assigna
ble to the |
3334 * actualParamTypeName | 3361 * actualParamTypeName |
3335 * @param className the name of the class where the overridden setter is decla
red | 3362 * @param className the name of the class where the overridden setter is decla
red |
3336 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE | 3363 * @see #INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE |
3337 */ | 3364 */ |
3338 static const StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = con
st StaticWarningCode.con1('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 40, "The
parameter type '%s' is not assignable to '%s' as required by the setter it is ov
erriding from '%s'"); | 3365 static const StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = con
st StaticWarningCode.con1('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 41, "The
parameter type '%s' is not assignable to '%s' as required by the setter it is ov
erriding from '%s'"); |
3339 | 3366 |
3340 /** | 3367 /** |
3341 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
… | 3368 * 12.6 Lists: A run-time list literal <<i>E</i>> [<i>e<sub>1</sub></i>
… |
3342 * <i>e<sub>n</sub></i>] is evaluated as follows: | 3369 * <i>e<sub>n</sub></i>] is evaluated as follows: |
3343 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument | 3370 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
second argument |
3344 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> | 3371 * <i>o<sub>i+1</sub></i><i>, 1 <= i <= n</i> |
3345 * | 3372 * |
3346 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 3373 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
3347 * <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 <= | 3374 * <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 <= |
3348 * 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>. | 3375 * 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>. |
3349 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 3376 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
3350 * j <= m</i>. | 3377 * j <= m</i>. |
3351 */ | 3378 */ |
3352 static const StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const Static
WarningCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 41, "The element type '%s'
cannot be assigned to the list type '%s'"); | 3379 static const StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const Static
WarningCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 42, "The element type '%s'
cannot be assigned to the list type '%s'"); |
3353 | 3380 |
3354 /** | 3381 /** |
3355 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 3382 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
3356 * <i>e<sub>1</sub></i> … <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>]
is evaluated as | 3383 * <i>e<sub>1</sub></i> … <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>]
is evaluated as |
3357 * follows: | 3384 * follows: |
3358 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 3385 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
3359 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 3386 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
3360 * | 3387 * |
3361 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 3388 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
3362 * <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 <= | 3389 * <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 <= |
3363 * 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>. | 3390 * 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>. |
3364 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 3391 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
3365 * j <= m</i>. | 3392 * j <= m</i>. |
3366 */ | 3393 */ |
3367 static const StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = const StaticWarni
ngCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 42, "The element type '%s' cannot be
assigned to the map key type '%s'"); | 3394 static const StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = const StaticWarni
ngCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 43, "The element type '%s' cannot be
assigned to the map key type '%s'"); |
3368 | 3395 |
3369 /** | 3396 /** |
3370 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : | 3397 * 12.7 Map: A run-time map literal <<i>K</i>, <i>V</i>> [<i>k<sub>1</su
b></i> : |
3371 * <i>e<sub>1</sub></i> … <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>]
is evaluated as | 3398 * <i>e<sub>1</sub></i> … <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>]
is evaluated as |
3372 * follows: | 3399 * follows: |
3373 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second | 3400 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s
ub></i> and second |
3374 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> | 3401 * argument <i>e<sub>i</sub></i><i>, 1 <= i <= n</i> |
3375 * | 3402 * |
3376 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of | 3403 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
type of |
3377 * <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 <= | 3404 * <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 <= |
3378 * 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>. | 3405 * 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>. |
3379 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= | 3406 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<
sub>j</sub>, 1 <= |
3380 * j <= m</i>. | 3407 * j <= m</i>. |
3381 */ | 3408 */ |
3382 static const StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = const StaticWar
ningCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 43, "The element type '%s' cannot
be assigned to the map value type '%s'"); | 3409 static const StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = const StaticWar
ningCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 44, "The element type '%s' cannot
be assigned to the map value type '%s'"); |
3383 | 3410 |
3384 /** | 3411 /** |
3385 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type | 3412 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type |
3386 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be | 3413 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be |
3387 * assigned to <i>S</i>. | 3414 * assigned to <i>S</i>. |
3388 */ | 3415 */ |
3389 static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = const Stat
icWarningCode.con1('MISMATCHED_GETTER_AND_SETTER_TYPES', 44, "The parameter type
for setter '%s' is '%s' which is not assignable to its getter (of type '%s')"); | 3416 static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = const Stat
icWarningCode.con1('MISMATCHED_GETTER_AND_SETTER_TYPES', 45, "The parameter type
for setter '%s' is '%s' which is not assignable to its getter (of type '%s')"); |
3390 | 3417 |
3391 /** | 3418 /** |
3392 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type | 3419 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
with argument type |
3393 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be | 3420 * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i
> may not be |
3394 * assigned to <i>S</i>. | 3421 * assigned to <i>S</i>. |
3395 */ | 3422 */ |
3396 static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTY
PE = const StaticWarningCode.con1('MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPER
TYPE', 45, "The parameter type for setter '%s' is '%s' which is not assignable t
o its getter (of type '%s'), from superclass '%s'"); | 3423 static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTY
PE = const StaticWarningCode.con1('MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPER
TYPE', 46, "The parameter type for setter '%s' is '%s' which is not assignable t
o its getter (of type '%s'), from superclass '%s'"); |
3397 | 3424 |
3398 /** | 3425 /** |
3399 * 13.12 Return: It is a static warning if a function contains both one or mor
e return statements | 3426 * 13.12 Return: It is a static warning if a function contains both one or mor
e return statements |
3400 * of the form <i>return;</i> and one or more return statements of the form <i
>return e;</i>. | 3427 * of the form <i>return;</i> and one or more return statements of the form <i
>return e;</i>. |
3401 */ | 3428 */ |
3402 static const StaticWarningCode MIXED_RETURN_TYPES = const StaticWarningCode.co
n1('MIXED_RETURN_TYPES', 46, "Methods and functions cannot use return both with
and without values"); | 3429 static const StaticWarningCode MIXED_RETURN_TYPES = const StaticWarningCode.co
n1('MIXED_RETURN_TYPES', 47, "Methods and functions cannot use return both with
and without values"); |
3403 | 3430 |
3404 /** | 3431 /** |
3405 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and | 3432 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abst
ract class and |
3406 * <i>q</i> is not a factory constructor. | 3433 * <i>q</i> is not a factory constructor. |
3407 */ | 3434 */ |
3408 static const StaticWarningCode NEW_WITH_ABSTRACT_CLASS = const StaticWarningCo
de.con1('NEW_WITH_ABSTRACT_CLASS', 47, "Abstract classes cannot be created with
a 'new' expression"); | 3435 static const StaticWarningCode NEW_WITH_ABSTRACT_CLASS = const StaticWarningCo
de.con1('NEW_WITH_ABSTRACT_CLASS', 48, "Abstract classes cannot be created with
a 'new' expression"); |
3409 | 3436 |
3410 /** | 3437 /** |
3411 * 15.8 Parameterized Types: Any use of a malbounded type gives rise to a stat
ic warning. | 3438 * 15.8 Parameterized Types: Any use of a malbounded type gives rise to a stat
ic warning. |
3412 * | 3439 * |
3413 * @param typeName the name of the type being referenced (<i>S</i>) | 3440 * @param typeName the name of the type being referenced (<i>S</i>) |
3414 * @param parameterCount the number of type parameters that were declared | 3441 * @param parameterCount the number of type parameters that were declared |
3415 * @param argumentCount the number of type arguments provided | 3442 * @param argumentCount the number of type arguments provided |
3416 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS | 3443 * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS |
3417 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS | 3444 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS |
3418 */ | 3445 */ |
3419 static const StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = const Static
WarningCode.con1('NEW_WITH_INVALID_TYPE_PARAMETERS', 48, "The type '%s' is decla
red with %d type parameters, but %d type arguments were given"); | 3446 static const StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = const Static
WarningCode.con1('NEW_WITH_INVALID_TYPE_PARAMETERS', 49, "The type '%s' is decla
red with %d type parameters, but %d type arguments were given"); |
3420 | 3447 |
3421 /** | 3448 /** |
3422 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, | 3449 * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible i
n the current scope, |
3423 * optionally followed by type arguments. | 3450 * optionally followed by type arguments. |
3424 * | 3451 * |
3425 * @param name the name of the non-type element | 3452 * @param name the name of the non-type element |
3426 */ | 3453 */ |
3427 static const StaticWarningCode NEW_WITH_NON_TYPE = const StaticWarningCode.con
1('NEW_WITH_NON_TYPE', 49, "The name '%s' is not a class"); | 3454 static const StaticWarningCode NEW_WITH_NON_TYPE = const StaticWarningCode.con
1('NEW_WITH_NON_TYPE', 50, "The name '%s' is not a class"); |
3428 | 3455 |
3429 /** | 3456 /** |
3430 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: | 3457 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
3431 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, | 3458 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
3432 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 3459 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
3433 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. | 3460 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
3434 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: | 3461 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
3435 * a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a st
atic warning if the | 3462 * a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a st
atic warning if the |
3436 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. | 3463 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
3437 */ | 3464 */ |
3438 static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = const StaticWa
rningCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR', 50, "The class '%s' does not ha
ve a constructor '%s'"); | 3465 static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = const StaticWa
rningCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR', 51, "The class '%s' does not ha
ve a constructor '%s'"); |
3439 | 3466 |
3440 /** | 3467 /** |
3441 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: | 3468 * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
current scope then: |
3442 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, | 3469 * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, …, a<sub>n<
/sub>, |
3443 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a | 3470 * x<sub>n+1</sub>: a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+k</sub
>)</i> it is a |
3444 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. | 3471 * static warning if <i>T.id</i> is not the name of a constructor declared by
the type <i>T</i>. |
3445 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: | 3472 * If <i>e</i> of the form <i>new T(a<sub>1</sub>, …, a<sub>n</sub>, x<
sub>n+1</sub>: |
3446 * a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a st
atic warning if the | 3473 * a<sub>n+1</sub>, …, x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a st
atic warning if the |
3447 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. | 3474 * type <i>T</i> does not declare a constructor with the same name as the decl
aration of <i>T</i>. |
3448 */ | 3475 */ |
3449 static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = const
StaticWarningCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 51, "The class
'%s' does not have a default constructor"); | 3476 static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = const
StaticWarningCode.con1('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 52, "The class
'%s' does not have a default constructor"); |
3450 | 3477 |
3451 /** | 3478 /** |
3452 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 3479 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
3453 * abstract method. | 3480 * abstract method. |
3454 * | 3481 * |
3455 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own | 3482 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
3456 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> | 3483 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
3457 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit | 3484 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
3458 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. | 3485 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
3459 * | 3486 * |
3460 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 3487 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
3461 * inherited in a concrete class unless that member overrides a concrete one. | 3488 * inherited in a concrete class unless that member overrides a concrete one. |
3462 * | 3489 * |
3463 * @param memberName the name of the first member | 3490 * @param memberName the name of the first member |
3464 * @param memberName the name of the second member | 3491 * @param memberName the name of the second member |
3465 * @param memberName the name of the third member | 3492 * @param memberName the name of the third member |
3466 * @param memberName the name of the fourth member | 3493 * @param memberName the name of the fourth member |
3467 * @param additionalCount the number of additional missing members that aren't
listed | 3494 * @param additionalCount the number of additional missing members that aren't
listed |
3468 */ | 3495 */ |
3469 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV
E_PLUS = const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMB
ER_FIVE_PLUS', 52, "Missing concrete implementation of %s, %s, %s, %s and %d mor
e"); | 3496 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIV
E_PLUS = const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMB
ER_FIVE_PLUS', 53, "Missing concrete implementation of %s, %s, %s, %s and %d mor
e"); |
3470 | 3497 |
3471 /** | 3498 /** |
3472 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 3499 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
3473 * abstract method. | 3500 * abstract method. |
3474 * | 3501 * |
3475 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own | 3502 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
3476 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> | 3503 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
3477 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit | 3504 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
3478 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. | 3505 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
3479 * | 3506 * |
3480 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 3507 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
3481 * inherited in a concrete class unless that member overrides a concrete one. | 3508 * inherited in a concrete class unless that member overrides a concrete one. |
3482 * | 3509 * |
3483 * @param memberName the name of the first member | 3510 * @param memberName the name of the first member |
3484 * @param memberName the name of the second member | 3511 * @param memberName the name of the second member |
3485 * @param memberName the name of the third member | 3512 * @param memberName the name of the third member |
3486 * @param memberName the name of the fourth member | 3513 * @param memberName the name of the fourth member |
3487 */ | 3514 */ |
3488 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU
R = const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FO
UR', 53, "Missing concrete implementation of %s, %s, %s and %s"); | 3515 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOU
R = const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FO
UR', 54, "Missing concrete implementation of %s, %s, %s and %s"); |
3489 | 3516 |
3490 /** | 3517 /** |
3491 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 3518 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
3492 * abstract method. | 3519 * abstract method. |
3493 * | 3520 * |
3494 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own | 3521 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
3495 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> | 3522 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
3496 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit | 3523 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
3497 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. | 3524 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
3498 * | 3525 * |
3499 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 3526 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
3500 * inherited in a concrete class unless that member overrides a concrete one. | 3527 * inherited in a concrete class unless that member overrides a concrete one. |
3501 * | 3528 * |
3502 * @param memberName the name of the member | 3529 * @param memberName the name of the member |
3503 */ | 3530 */ |
3504 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
', 54, "Missing concrete implementation of %s"); | 3531 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
= const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
', 55, "Missing concrete implementation of %s"); |
3505 | 3532 |
3506 /** | 3533 /** |
3507 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 3534 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
3508 * abstract method. | 3535 * abstract method. |
3509 * | 3536 * |
3510 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own | 3537 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
3511 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> | 3538 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
3512 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit | 3539 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
3513 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. | 3540 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
3514 * | 3541 * |
3515 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 3542 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
3516 * inherited in a concrete class unless that member overrides a concrete one. | 3543 * inherited in a concrete class unless that member overrides a concrete one. |
3517 * | 3544 * |
3518 * @param memberName the name of the first member | 3545 * @param memberName the name of the first member |
3519 * @param memberName the name of the second member | 3546 * @param memberName the name of the second member |
3520 * @param memberName the name of the third member | 3547 * @param memberName the name of the third member |
3521 */ | 3548 */ |
3522 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR
EE = const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_T
HREE', 55, "Missing concrete implementation of %s, %s and %s"); | 3549 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THR
EE = const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_T
HREE', 56, "Missing concrete implementation of %s, %s and %s"); |
3523 | 3550 |
3524 /** | 3551 /** |
3525 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an | 3552 * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract
class inherits an |
3526 * abstract method. | 3553 * abstract method. |
3527 * | 3554 * |
3528 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own | 3555 * 7.10 Superinterfaces: Let <i>C</i> be a concrete class that does not declar
e its own |
3529 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> | 3556 * <i>noSuchMethod()</i> method. It is a static warning if the implicit interf
ace of <i>C</i> |
3530 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit | 3557 * includes an instance member <i>m</i> of type <i>F</i> and <i>C</i> does not
declare or inherit |
3531 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. | 3558 * a corresponding instance member <i>m</i> of type <i>F'</i> such that <i>F'
<: F</i>. |
3532 * | 3559 * |
3533 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or | 3560 * 7.4 Abstract Instance Members: It is a static warning if an abstract member
is declared or |
3534 * inherited in a concrete class unless that member overrides a concrete one. | 3561 * inherited in a concrete class unless that member overrides a concrete one. |
3535 * | 3562 * |
3536 * @param memberName the name of the first member | 3563 * @param memberName the name of the first member |
3537 * @param memberName the name of the second member | 3564 * @param memberName the name of the second member |
3538 */ | 3565 */ |
3539 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
= const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
', 56, "Missing concrete implementation of %s and %s"); | 3566 static const StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
= const StaticWarningCode.con1('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
', 57, "Missing concrete implementation of %s and %s"); |
3540 | 3567 |
3541 /** | 3568 /** |
3542 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s
ub>2</sub>) s</i> or | 3569 * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<s
ub>2</sub>) s</i> or |
3543 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty
pe of <i>T</i>. It | 3570 * <i>on T s</i> matches an object <i>o</i> if the type of <i>o</i> is a subty
pe of <i>T</i>. It |
3544 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the | 3571 * is a static warning if <i>T</i> does not denote a type available in the lex
ical scope of the |
3545 * catch clause. | 3572 * catch clause. |
3546 * | 3573 * |
3547 * @param name the name of the non-type element | 3574 * @param name the name of the non-type element |
3548 */ | 3575 */ |
3549 static const StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = const StaticWarningC
ode.con1('NON_TYPE_IN_CATCH_CLAUSE', 57, "The name '%s' is not a type and cannot
be used in an on-catch clause"); | 3576 static const StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = const StaticWarningC
ode.con1('NON_TYPE_IN_CATCH_CLAUSE', 58, "The name '%s' is not a type and cannot
be used in an on-catch clause"); |
3550 | 3577 |
3551 /** | 3578 /** |
3552 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator []= is | 3579 * 7.1.1 Operators: It is a static warning if the return type of the user-decl
ared operator []= is |
3553 * explicitly declared and not void. | 3580 * explicitly declared and not void. |
3554 */ | 3581 */ |
3555 static const StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = const StaticWarn
ingCode.con1('NON_VOID_RETURN_FOR_OPERATOR', 58, "The return type of the operato
r []= must be 'void'"); | 3582 static const StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = const StaticWarn
ingCode.con1('NON_VOID_RETURN_FOR_OPERATOR', 59, "The return type of the operato
r []= must be 'void'"); |
3556 | 3583 |
3557 /** | 3584 /** |
3558 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. | 3585 * 7.3 Setters: It is a static warning if a setter declares a return type othe
r than void. |
3559 */ | 3586 */ |
3560 static const StaticWarningCode NON_VOID_RETURN_FOR_SETTER = const StaticWarnin
gCode.con1('NON_VOID_RETURN_FOR_SETTER', 59, "The return type of the setter must
be 'void'"); | 3587 static const StaticWarningCode NON_VOID_RETURN_FOR_SETTER = const StaticWarnin
gCode.con1('NON_VOID_RETURN_FOR_SETTER', 60, "The return type of the setter must
be 'void'"); |
3561 | 3588 |
3562 /** | 3589 /** |
3563 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the | 3590 * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the for
m <i>id</i> or the |
3564 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively | 3591 * form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</
i> (respectively |
3565 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type paramet
er in the | 3592 * <i>prefix.id</i>) does not denote a type. * <i>T</i> denotes a type paramet
er in the |
3566 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * | 3593 * enclosing lexical scope, but occurs in the signature or body of a static me
mber. * |
3567 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, | 3594 * <i>T</i> is a parameterized type of the form <i>G<S<sub>1</sub>, .., S<s
ub>n</sub>></i>, |
3568 * | 3595 * |
3569 * Any use of a malformed type gives rise to a static warning. | 3596 * Any use of a malformed type gives rise to a static warning. |
3570 * | 3597 * |
3571 * @param nonTypeName the name that is not a type | 3598 * @param nonTypeName the name that is not a type |
3572 */ | 3599 */ |
3573 static const StaticWarningCode NOT_A_TYPE = const StaticWarningCode.con1('NOT_
A_TYPE', 60, "%s is not a type"); | 3600 static const StaticWarningCode NOT_A_TYPE = const StaticWarningCode.con1('NOT_
A_TYPE', 61, "%s is not a type"); |
3574 | 3601 |
3575 /** | 3602 /** |
3576 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > | 3603 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</
i> or if <i>m > |
3577 * n</i>. | 3604 * n</i>. |
3578 * | 3605 * |
3579 * @param requiredCount the expected number of required arguments | 3606 * @param requiredCount the expected number of required arguments |
3580 * @param argumentCount the actual number of positional arguments given | 3607 * @param argumentCount the actual number of positional arguments given |
3581 * @see #EXTRA_POSITIONAL_ARGUMENTS | 3608 * @see #EXTRA_POSITIONAL_ARGUMENTS |
3582 */ | 3609 */ |
3583 static const StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const StaticWar
ningCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 61, "%d required argument(s) expe
cted, but %d found"); | 3610 static const StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const StaticWar
ningCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 62, "%d required argument(s) expe
cted, but %d found"); |
3584 | 3611 |
3585 /** | 3612 /** |
3586 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library | 3613 * 14.3 Parts: It is a static warning if the referenced part declaration <i>p<
/i> names a library |
3587 * other than the current library as the library to which <i>p</i> belongs. | 3614 * other than the current library as the library to which <i>p</i> belongs. |
3588 * | 3615 * |
3589 * @param expectedLibraryName the name of expected library name | 3616 * @param expectedLibraryName the name of expected library name |
3590 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration | 3617 * @param actualLibraryName the non-matching actual library name from the "par
t of" declaration |
3591 */ | 3618 */ |
3592 static const StaticWarningCode PART_OF_DIFFERENT_LIBRARY = const StaticWarning
Code.con1('PART_OF_DIFFERENT_LIBRARY', 62, "Expected this library to be part of
'%s', not '%s'"); | 3619 static const StaticWarningCode PART_OF_DIFFERENT_LIBRARY = const StaticWarning
Code.con1('PART_OF_DIFFERENT_LIBRARY', 63, "Expected this library to be part of
'%s', not '%s'"); |
3593 | 3620 |
3594 /** | 3621 /** |
3595 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of | 3622 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
3596 * the type of <i>k</i>. | 3623 * the type of <i>k</i>. |
3597 * | 3624 * |
3598 * @param redirectedName the name of the redirected constructor | 3625 * @param redirectedName the name of the redirected constructor |
3599 * @param redirectingName the name of the redirecting constructor | 3626 * @param redirectingName the name of the redirecting constructor |
3600 */ | 3627 */ |
3601 static const StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = const Stati
cWarningCode.con1('REDIRECT_TO_INVALID_FUNCTION_TYPE', 63, "The redirected const
ructor '%s' has incompatible parameters with '%s'"); | 3628 static const StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = const Stati
cWarningCode.con1('REDIRECT_TO_INVALID_FUNCTION_TYPE', 64, "The redirected const
ructor '%s' has incompatible parameters with '%s'"); |
3602 | 3629 |
3603 /** | 3630 /** |
3604 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of | 3631 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> i
s not a subtype of |
3605 * the type of <i>k</i>. | 3632 * the type of <i>k</i>. |
3606 * | 3633 * |
3607 * @param redirectedName the name of the redirected constructor return type | 3634 * @param redirectedName the name of the redirected constructor return type |
3608 * @param redirectingName the name of the redirecting constructor return type | 3635 * @param redirectingName the name of the redirecting constructor return type |
3609 */ | 3636 */ |
3610 static const StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = const StaticW
arningCode.con1('REDIRECT_TO_INVALID_RETURN_TYPE', 64, "The return type '%s' of
the redirected constructor is not assignable to '%s'"); | 3637 static const StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = const StaticW
arningCode.con1('REDIRECT_TO_INVALID_RETURN_TYPE', 65, "The return type '%s' of
the redirected constructor is not assignable to '%s'"); |
3611 | 3638 |
3612 /** | 3639 /** |
3613 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 3640 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
3614 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 3641 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
3615 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 3642 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
3616 */ | 3643 */ |
3617 static const StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = const StaticW
arningCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 65, "The constructor '%s' cou
ld not be found in '%s'"); | 3644 static const StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = const StaticW
arningCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 66, "The constructor '%s' cou
ld not be found in '%s'"); |
3618 | 3645 |
3619 /** | 3646 /** |
3620 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the | 3647 * 7.6.2 Factories: It is a static warning if type does not denote a class acc
essible in the |
3621 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the | 3648 * current scope; if type does denote such a class <i>C</i> it is a static war
ning if the |
3622 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. | 3649 * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a const
ructor of <i>C</i>. |
3623 */ | 3650 */ |
3624 static const StaticWarningCode REDIRECT_TO_NON_CLASS = const StaticWarningCode
.con1('REDIRECT_TO_NON_CLASS', 66, "The name '%s' is not a type and cannot be us
ed in a redirected constructor"); | 3651 static const StaticWarningCode REDIRECT_TO_NON_CLASS = const StaticWarningCode
.con1('REDIRECT_TO_NON_CLASS', 67, "The name '%s' is not a type and cannot be us
ed in a redirected constructor"); |
3625 | 3652 |
3626 /** | 3653 /** |
3627 * 13.12 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form | 3654 * 13.12 Return: Let <i>f</i> be the function immediately enclosing a return s
tatement of the form |
3628 * <i>return;</i> It is a static warning if both of the following conditions h
old: | 3655 * <i>return;</i> It is a static warning if both of the following conditions h
old: |
3629 * <ol> | 3656 * <ol> |
3630 * * <i>f</i> is not a generative constructor. | 3657 * * <i>f</i> is not a generative constructor. |
3631 * * The return type of <i>f</i> may not be assigned to void. | 3658 * * The return type of <i>f</i> may not be assigned to void. |
3632 * </ol> | 3659 * </ol> |
3633 */ | 3660 */ |
3634 static const StaticWarningCode RETURN_WITHOUT_VALUE = const StaticWarningCode.
con1('RETURN_WITHOUT_VALUE', 67, "Missing return value after 'return'"); | 3661 static const StaticWarningCode RETURN_WITHOUT_VALUE = const StaticWarningCode.
con1('RETURN_WITHOUT_VALUE', 68, "Missing return value after 'return'"); |
3635 | 3662 |
3636 /** | 3663 /** |
3637 * 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 3664 * 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
3638 * or getter <i>m</i>. | 3665 * or getter <i>m</i>. |
3639 * | 3666 * |
3640 * @param memberName the name of the instance member | 3667 * @param memberName the name of the instance member |
3641 */ | 3668 */ |
3642 static const StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = const Static
WarningCode.con1('STATIC_ACCESS_TO_INSTANCE_MEMBER', 68, "Instance member '%s' c
annot be accessed using static access"); | 3669 static const StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = const Static
WarningCode.con1('STATIC_ACCESS_TO_INSTANCE_MEMBER', 69, "Instance member '%s' c
annot be accessed using static access"); |
3643 | 3670 |
3644 /** | 3671 /** |
3645 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of | 3672 * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assi
gned to the type of |
3646 * <i>e<sub>k</sub></i>. | 3673 * <i>e<sub>k</sub></i>. |
3647 */ | 3674 */ |
3648 static const StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = const Static
WarningCode.con1('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 69, "Type '%s' of the switc
h expression is not assignable to the type '%s' of case expressions"); | 3675 static const StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = const Static
WarningCode.con1('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 70, "Type '%s' of the switc
h expression is not assignable to the type '%s' of case expressions"); |
3649 | 3676 |
3650 /** | 3677 /** |
3651 * 15.1 Static Types: It is a static warning to use a deferred type in a type
annotation. | 3678 * 15.1 Static Types: It is a static warning to use a deferred type in a type
annotation. |
3652 * | 3679 * |
3653 * @param name the name of the type that is deferred and being used in a type
annotation | 3680 * @param name the name of the type that is deferred and being used in a type
annotation |
3654 */ | 3681 */ |
3655 static const StaticWarningCode TYPE_ANNOTATION_DEFERRED_CLASS = const StaticWa
rningCode.con1('TYPE_ANNOTATION_DEFERRED_CLASS', 70, "The deferred type '%s' can
not be used in a declaration"); | 3682 static const StaticWarningCode TYPE_ANNOTATION_DEFERRED_CLASS = const StaticWa
rningCode.con1('TYPE_ANNOTATION_DEFERRED_CLASS', 71, "The deferred type '%s' can
not be used in a declaration, cast or type test"); |
3656 | 3683 |
3657 /** | 3684 /** |
3658 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the | 3685 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
available in the |
3659 * current lexical scope. | 3686 * current lexical scope. |
3660 */ | 3687 */ |
3661 static const StaticWarningCode TYPE_TEST_NON_TYPE = const StaticWarningCode.co
n1('TYPE_TEST_NON_TYPE', 71, "The name '%s' is not a type and cannot be used in
an 'is' expression"); | 3688 static const StaticWarningCode TYPE_TEST_NON_TYPE = const StaticWarningCode.co
n1('TYPE_TEST_NON_TYPE', 72, "The name '%s' is not a type and cannot be used in
an 'is' expression"); |
3662 | 3689 |
3663 /** | 3690 /** |
3664 * 10 Generics: However, a type parameter is considered to be a malformed type
when referenced by | 3691 * 10 Generics: However, a type parameter is considered to be a malformed type
when referenced by |
3665 * a static member. | 3692 * a static member. |
3666 * | 3693 * |
3667 * 15.1 Static Types: Any use of a malformed type gives rise to a static warni
ng. A malformed type | 3694 * 15.1 Static Types: Any use of a malformed type gives rise to a static warni
ng. A malformed type |
3668 * is then interpreted as dynamic by the static type checker and the runtime. | 3695 * is then interpreted as dynamic by the static type checker and the runtime. |
3669 */ | 3696 */ |
3670 static const StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = const Sta
ticWarningCode.con1('TYPE_PARAMETER_REFERENCED_BY_STATIC', 72, "Static members c
annot reference type parameters"); | 3697 static const StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = const Sta
ticWarningCode.con1('TYPE_PARAMETER_REFERENCED_BY_STATIC', 73, "Static members c
annot reference type parameters"); |
3671 | 3698 |
3672 /** | 3699 /** |
3673 * 12.16.3 Static Invocation: A static method invocation <i>i</i> has the form | 3700 * 12.16.3 Static Invocation: A static method invocation <i>i</i> has the form |
3674 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … | 3701 * <i>C.m(a<sub>1</sub>, …, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</
sub>, … |
3675 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static warning if <i>C</i> d
oes not denote a | 3702 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a static warning if <i>C</i> d
oes not denote a |
3676 * class in the current scope. | 3703 * class in the current scope. |
3677 * | 3704 * |
3678 * @param undefinedClassName the name of the undefined class | 3705 * @param undefinedClassName the name of the undefined class |
3679 */ | 3706 */ |
3680 static const StaticWarningCode UNDEFINED_CLASS = const StaticWarningCode.con1(
'UNDEFINED_CLASS', 73, "Undefined class '%s'"); | 3707 static const StaticWarningCode UNDEFINED_CLASS = const StaticWarningCode.con1(
'UNDEFINED_CLASS', 74, "Undefined class '%s'"); |
3681 | 3708 |
3682 /** | 3709 /** |
3683 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". | 3710 * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool". |
3684 */ | 3711 */ |
3685 static const StaticWarningCode UNDEFINED_CLASS_BOOLEAN = const StaticWarningCo
de.con1('UNDEFINED_CLASS_BOOLEAN', 74, "Undefined class 'boolean'; did you mean
'bool'?"); | 3712 static const StaticWarningCode UNDEFINED_CLASS_BOOLEAN = const StaticWarningCo
de.con1('UNDEFINED_CLASS_BOOLEAN', 75, "Undefined class 'boolean'; did you mean
'bool'?"); |
3686 | 3713 |
3687 /** | 3714 /** |
3688 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing | 3715 * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</
i> in the enclosing |
3689 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter | 3716 * lexical scope of <i>i</i>, or if <i>C</i> does not declare, implicitly or e
xplicitly, a getter |
3690 * named <i>m</i>. | 3717 * named <i>m</i>. |
3691 * | 3718 * |
3692 * @param getterName the name of the getter | 3719 * @param getterName the name of the getter |
3693 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for | 3720 * @param enclosingType the name of the enclosing type where the getter is bei
ng looked for |
3694 */ | 3721 */ |
3695 static const StaticWarningCode UNDEFINED_GETTER = const StaticWarningCode.con1
('UNDEFINED_GETTER', 75, "There is no such getter '%s' in '%s'"); | 3722 static const StaticWarningCode UNDEFINED_GETTER = const StaticWarningCode.con1
('UNDEFINED_GETTER', 76, "There is no such getter '%s' in '%s'"); |
3696 | 3723 |
3697 /** | 3724 /** |
3698 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form | 3725 * 12.30 Identifier Reference: It is as static warning if an identifier expres
sion of the form |
3699 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or | 3726 * <i>id</i> occurs inside a top level or static function (be it function, met
hod, getter, or |
3700 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the | 3727 * setter) or variable initializer and there is no declaration <i>d</i> with n
ame <i>id</i> in the |
3701 * lexical scope enclosing the expression. | 3728 * lexical scope enclosing the expression. |
3702 * | 3729 * |
3703 * @param name the name of the identifier | 3730 * @param name the name of the identifier |
3704 */ | 3731 */ |
3705 static const StaticWarningCode UNDEFINED_IDENTIFIER = const StaticWarningCode.
con1('UNDEFINED_IDENTIFIER', 76, "Undefined name '%s'"); | 3732 static const StaticWarningCode UNDEFINED_IDENTIFIER = const StaticWarningCode.
con1('UNDEFINED_IDENTIFIER', 77, "Undefined name '%s'"); |
3706 | 3733 |
3707 /** | 3734 /** |
3708 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, | 3735 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
<i>1<=i<=l</i>, |
3709 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> … | 3736 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i
> … |
3710 * <i>p<sub>n+k</sub></i>} or a static warning occurs. | 3737 * <i>p<sub>n+k</sub></i>} or a static warning occurs. |
3711 * | 3738 * |
3712 * @param name the name of the requested named parameter | 3739 * @param name the name of the requested named parameter |
3713 */ | 3740 */ |
3714 static const StaticWarningCode UNDEFINED_NAMED_PARAMETER = const StaticWarning
Code.con1('UNDEFINED_NAMED_PARAMETER', 77, "The named parameter '%s' is not defi
ned"); | 3741 static const StaticWarningCode UNDEFINED_NAMED_PARAMETER = const StaticWarning
Code.con1('UNDEFINED_NAMED_PARAMETER', 78, "The named parameter '%s' is not defi
ned"); |
3715 | 3742 |
3716 /** | 3743 /** |
3717 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs | 3744 * 12.18 Assignment: It is as static warning if an assignment of the form <i>v
= e</i> occurs |
3718 * inside a top level or static function (be it function, method, getter, or s
etter) or variable | 3745 * inside a top level or static function (be it function, method, getter, or s
etter) or variable |
3719 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope | 3746 * initializer and there is no declaration <i>d</i> with name <i>v=</i> in the
lexical scope |
3720 * enclosing the assignment. | 3747 * enclosing the assignment. |
3721 * | 3748 * |
3722 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical | 3749 * 12.18 Assignment: It is a static warning if there is no class <i>C</i> in t
he enclosing lexical |
3723 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter | 3750 * scope of the assignment, or if <i>C</i> does not declare, implicitly or exp
licitly, a setter |
3724 * <i>v=</i>. | 3751 * <i>v=</i>. |
3725 * | 3752 * |
3726 * @param setterName the name of the getter | 3753 * @param setterName the name of the getter |
3727 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for | 3754 * @param enclosingType the name of the enclosing type where the setter is bei
ng looked for |
3728 */ | 3755 */ |
3729 static const StaticWarningCode UNDEFINED_SETTER = const StaticWarningCode.con1
('UNDEFINED_SETTER', 78, "There is no such setter '%s' in '%s'"); | 3756 static const StaticWarningCode UNDEFINED_SETTER = const StaticWarningCode.con1
('UNDEFINED_SETTER', 79, "There is no such setter '%s' in '%s'"); |
3730 | 3757 |
3731 /** | 3758 /** |
3732 * 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method | 3759 * 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not decl
are a static method |
3733 * or getter <i>m</i>. | 3760 * or getter <i>m</i>. |
3734 * | 3761 * |
3735 * @param methodName the name of the method | 3762 * @param methodName the name of the method |
3736 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for | 3763 * @param enclosingType the name of the enclosing type where the method is bei
ng looked for |
3737 */ | 3764 */ |
3738 static const StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = const Stati
cWarningCode.con1('UNDEFINED_STATIC_METHOD_OR_GETTER', 79, "There is no such sta
tic method, getter or setter '%s' in '%s'"); | 3765 static const StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = const Stati
cWarningCode.con1('UNDEFINED_STATIC_METHOD_OR_GETTER', 80, "There is no such sta
tic method, getter or setter '%s' in '%s'"); |
3739 | 3766 |
3740 /** | 3767 /** |
3741 * 7.2 Getters: It is a static warning if the return type of a getter is void. | 3768 * 7.2 Getters: It is a static warning if the return type of a getter is void. |
3742 */ | 3769 */ |
3743 static const StaticWarningCode VOID_RETURN_FOR_GETTER = const StaticWarningCod
e.con1('VOID_RETURN_FOR_GETTER', 80, "The return type of the getter must not be
'void'"); | 3770 static const StaticWarningCode VOID_RETURN_FOR_GETTER = const StaticWarningCod
e.con1('VOID_RETURN_FOR_GETTER', 81, "The return type of the getter must not be
'void'"); |
3744 | 3771 |
3745 static const List<StaticWarningCode> values = const [ | 3772 static const List<StaticWarningCode> values = const [ |
3746 AMBIGUOUS_IMPORT, | 3773 AMBIGUOUS_IMPORT, |
3747 ARGUMENT_TYPE_NOT_ASSIGNABLE, | 3774 ARGUMENT_TYPE_NOT_ASSIGNABLE, |
3748 ASSIGNMENT_TO_CONST, | 3775 ASSIGNMENT_TO_CONST, |
3749 ASSIGNMENT_TO_FINAL, | 3776 ASSIGNMENT_TO_FINAL, |
| 3777 ASSIGNMENT_TO_FINAL_NO_SETTER, |
3750 ASSIGNMENT_TO_FUNCTION, | 3778 ASSIGNMENT_TO_FUNCTION, |
3751 ASSIGNMENT_TO_METHOD, | 3779 ASSIGNMENT_TO_METHOD, |
3752 CASE_BLOCK_NOT_TERMINATED, | 3780 CASE_BLOCK_NOT_TERMINATED, |
3753 CAST_TO_NON_TYPE, | 3781 CAST_TO_NON_TYPE, |
3754 CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, | 3782 CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, |
3755 CONFLICTING_DART_IMPORT, | 3783 CONFLICTING_DART_IMPORT, |
3756 CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, | 3784 CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, |
3757 CONFLICTING_INSTANCE_METHOD_SETTER, | 3785 CONFLICTING_INSTANCE_METHOD_SETTER, |
3758 CONFLICTING_INSTANCE_METHOD_SETTER2, | 3786 CONFLICTING_INSTANCE_METHOD_SETTER2, |
3759 CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER, | 3787 CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER, |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3891 | 3919 |
3892 @override | 3920 @override |
3893 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 3921 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
3894 | 3922 |
3895 @override | 3923 @override |
3896 String get message => "%s"; | 3924 String get message => "%s"; |
3897 | 3925 |
3898 @override | 3926 @override |
3899 ErrorType get type => ErrorType.TODO; | 3927 ErrorType get type => ErrorType.TODO; |
3900 } | 3928 } |
OLD | NEW |