Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 435483002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 'dart:collection'; 10 import 'dart:collection';
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 */ 492 */
493 static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER = const CompileTimeErrorCode.con1('CONFLICTING_TYPE_VARIABLE_AND_MEMBER', 14, "'%s' can not be used to name a type varaible and member in this class"); 493 static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER = const CompileTimeErrorCode.con1('CONFLICTING_TYPE_VARIABLE_AND_MEMBER', 14, "'%s' can not be used to name a type varaible and member in this class");
494 494
495 /** 495 /**
496 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 496 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
497 * uncaught exception being thrown. 497 * uncaught exception being thrown.
498 */ 498 */
499 static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = const C ompileTimeErrorCode.con1('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 15, "'const' cons tructors cannot throw exceptions"); 499 static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = const C ompileTimeErrorCode.con1('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 15, "'const' cons tructors cannot throw exceptions");
500 500
501 /** 501 /**
502 * 10.6.3 Constant Constructors: It is a compile-time error if a constant cons tructor is declared
503 * by a class C if any instance variable declared in C is initialized with an expression that is
504 * not a constant expression.
505 */
506 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_ NON_CONST = const CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_FIELD_INITIA LIZED_BY_NON_CONST', 16, "Can't define the 'const' constructor because the field '%s' is initialized with a non-constant value");
507
508 /**
502 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly or implicitly, in 509 * 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 510 * 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. 511 * superclass of the immediately enclosing class or a compile-time error occur s.
505 * 512 *
506 * 9 Mixins: For each generative constructor named ... an implicitly declared constructor named 513 * 9 Mixins: For each generative constructor named ... an implicitly declared constructor named
507 * ... is declared. 514 * ... is declared.
508 */ 515 */
509 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN = const Compile TimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_MIXIN', 16, "Constant constructor can not be declared for a class with a mixin"); 516 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN = const Compile TimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_MIXIN', 17, "Constant constructor can not be declared for a class with a mixin");
510 517
511 /** 518 /**
512 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly or implicitly, in 519 * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly or implicitly, in
513 * the initializer list of a constant constructor must specify a constant cons tructor of the 520 * the initializer list of a constant constructor must specify a constant cons tructor of the
514 * superclass of the immediately enclosing class or a compile-time error occur s. 521 * superclass of the immediately enclosing class or a compile-time error occur s.
515 */ 522 */
516 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = con st CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 17, "Cons tant constructor cannot call non-constant super constructor of '%s'"); 523 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER = con st CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER', 18, "Cons tant constructor cannot call non-constant super constructor of '%s'");
517 524
518 /** 525 /**
519 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const ructor is declared 526 * 7.6.3 Constant Constructors: It is a compile-time error if a constant const ructor is declared
520 * by a class that has a non-final instance variable. 527 * by a class that has a non-final instance variable.
521 * 528 *
522 * The above refers to both locally declared and inherited instance variables. 529 * The above refers to both locally declared and inherited instance variables.
523 */ 530 */
524 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = con st CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 18, "Cann ot define the 'const' constructor for a class with non-final fields"); 531 static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = con st CompileTimeErrorCode.con1('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 19, "Cann ot define the 'const' constructor for a class with non-final fields");
525 532
526 /** 533 /**
527 * 12.12.2 Const: It is a compile-time error if <i>T</i> is a deferred type. 534 * 12.12.2 Const: It is a compile-time error if <i>T</i> is a deferred type.
528 */ 535 */
529 static const CompileTimeErrorCode CONST_DEFERRED_CLASS = const CompileTimeErro rCode.con1('CONST_DEFERRED_CLASS', 19, "Deferred classes cannot be created with 'const'"); 536 static const CompileTimeErrorCode CONST_DEFERRED_CLASS = const CompileTimeErro rCode.con1('CONST_DEFERRED_CLASS', 20, "Deferred classes cannot be created with 'const'");
530 537
531 /** 538 /**
532 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not 539 * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not
533 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of the static type of 540 * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of the static type of
534 * the field <i>v</i>. 541 * the field <i>v</i>.
535 * 542 *
536 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 543 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
537 * uncaught exception being thrown. 544 * uncaught exception being thrown.
538 * 545 *
539 * @param initializerType the name of the type of the initializer expression 546 * @param initializerType the name of the type of the initializer expression
540 * @param fieldType the name of the type of the field 547 * @param fieldType the name of the type of the field
541 */ 548 */
542 static const CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = con st CompileTimeErrorCode.con1('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 20, "The initializer type '%s' cannot be assigned to the field type '%s'"); 549 static const CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = con st CompileTimeErrorCode.con1('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 21, "The initializer type '%s' cannot be assigned to the field type '%s'");
543 550
544 /** 551 /**
545 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a 552 * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a
546 * constant variable. 553 * constant variable.
547 */ 554 */
548 static const CompileTimeErrorCode CONST_FORMAL_PARAMETER = const CompileTimeEr rorCode.con1('CONST_FORMAL_PARAMETER', 21, "Parameters cannot be 'const'"); 555 static const CompileTimeErrorCode CONST_FORMAL_PARAMETER = const CompileTimeEr rorCode.con1('CONST_FORMAL_PARAMETER', 22, "Parameters cannot be 'const'");
549 556
550 /** 557 /**
551 * 5 Variables: A constant variable must be initialized to a compile-time cons tant or a 558 * 5 Variables: A constant variable must be initialized to a compile-time cons tant or a
552 * compile-time error occurs. 559 * compile-time error occurs.
553 */ 560 */
554 static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = const CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 22, "'const' variables must be constant value"); 561 static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = const CompileTimeErrorCode.con1('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 23, "'const' variables must be constant value");
555 562
556 /** 563 /**
557 * 5 Variables: A constant variable must be initialized to a compile-time cons tant or a 564 * 5 Variables: A constant variable must be initialized to a compile-time cons tant or a
558 * compile-time error occurs. 565 * compile-time error occurs.
559 * 566 *
560 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a 567 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a
561 * deferred prefix. 568 * deferred prefix.
562 */ 569 */
563 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', 23, "Constant values from a deferred li brary cannot be used to initialized a 'const' variable"); 570 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', 24, "Constant values from a deferred li brary cannot be used to initialized a 'const' variable");
564 571
565 /** 572 /**
566 * 7.5 Instance Variables: It is a compile-time error if an instance variable is declared to be 573 * 7.5 Instance Variables: It is a compile-time error if an instance variable is declared to be
567 * constant. 574 * constant.
568 */ 575 */
569 static const CompileTimeErrorCode CONST_INSTANCE_FIELD = const CompileTimeErro rCode.con1('CONST_INSTANCE_FIELD', 24, "Only static fields can be declared as 'c onst'"); 576 static const CompileTimeErrorCode CONST_INSTANCE_FIELD = const CompileTimeErro rCode.con1('CONST_INSTANCE_FIELD', 25, "Only static fields can be declared as 'c onst'");
570 577
571 /** 578 /**
572 * 12.8 Maps: It is a compile-time error if the key of an entry in a constant map literal is an 579 * 12.8 Maps: It is a compile-time error if the key of an entry in a constant map literal is an
573 * instance of a class that implements the operator <i>==</i> unless the key i s a string or 580 * instance of a class that implements the operator <i>==</i> unless the key i s a string or
574 * integer. 581 * integer.
575 */ 582 */
576 static const CompileTimeErrorCode CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQU ALS = const CompileTimeErrorCode.con1('CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_ EQUALS', 25, "The constant map entry key expression type '%s' cannot override th e == operator"); 583 static const CompileTimeErrorCode CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQU ALS = const CompileTimeErrorCode.con1('CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_ EQUALS', 26, "The constant map entry key expression type '%s' cannot override th e == operator");
577 584
578 /** 585 /**
579 * 5 Variables: A constant variable must be initialized to a compile-time cons tant (12.1) or a 586 * 5 Variables: A constant variable must be initialized to a compile-time cons tant (12.1) or a
580 * compile-time error occurs. 587 * compile-time error occurs.
581 * 588 *
582 * @param name the name of the uninitialized final variable 589 * @param name the name of the uninitialized final variable
583 */ 590 */
584 static const CompileTimeErrorCode CONST_NOT_INITIALIZED = const CompileTimeErr orCode.con1('CONST_NOT_INITIALIZED', 26, "The const variable '%s' must be initia lized"); 591 static const CompileTimeErrorCode CONST_NOT_INITIALIZED = const CompileTimeErr orCode.con1('CONST_NOT_INITIALIZED', 27, "The const variable '%s' must be initia lized");
585 592
586 /** 593 /**
587 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 and e2 594 * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 and e2
588 * are constant expressions that evaluate to a boolean value. 595 * are constant expressions that evaluate to a boolean value.
589 */ 596 */
590 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = const CompileTimeErro rCode.con1('CONST_EVAL_TYPE_BOOL', 27, "An expression of type 'bool' was expecte d"); 597 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = const CompileTimeErro rCode.con1('CONST_EVAL_TYPE_BOOL', 28, "An expression of type 'bool' was expecte d");
591 598
592 /** 599 /**
593 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where e1 and e2 are 600 * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where e1 and e2 are
594 * constant expressions that evaluate to a numeric, string or boolean value or to null. 601 * constant expressions that evaluate to a numeric, string or boolean value or to null.
595 */ 602 */
596 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = const Comp ileTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 28, "An expression of t ype 'bool', 'num', 'String' or 'null' was expected"); 603 static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = const Comp ileTimeErrorCode.con1('CONST_EVAL_TYPE_BOOL_NUM_STRING', 29, "An expression of t ype 'bool', 'num', 'String' or 'null' was expected");
597 604
598 /** 605 /**
599 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 or e1 606 * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 or e1
600 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte ger value or to 607 * << e2, where e, e1 and e2 are constant expressions that evaluate to an inte ger value or to
601 * null. 608 * null.
602 */ 609 */
603 static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = const CompileTimeError Code.con1('CONST_EVAL_TYPE_INT', 29, "An expression of type 'int' was expected") ; 610 static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = const CompileTimeError Code.con1('CONST_EVAL_TYPE_INT', 30, "An expression of type 'int' was expected") ;
604 611
605 /** 612 /**
606 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 * e2, e1 / e2, e1 ~/ 613 * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 * e2, e1 / e2, e1 ~/
607 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are constant 614 * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are constant
608 * expressions that evaluate to a numeric value or to null.. 615 * expressions that evaluate to a numeric value or to null..
609 */ 616 */
610 static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = const CompileTimeError Code.con1('CONST_EVAL_TYPE_NUM', 30, "An expression of type 'num' was expected") ; 617 static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = const CompileTimeError Code.con1('CONST_EVAL_TYPE_NUM', 31, "An expression of type 'num' was expected") ;
611 618
612 /** 619 /**
613 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 620 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
614 * uncaught exception being thrown. 621 * uncaught exception being thrown.
615 */ 622 */
616 static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = const CompileT imeErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 31, "Evaluation of this constan t expression causes exception"); 623 static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = const CompileT imeErrorCode.con1('CONST_EVAL_THROWS_EXCEPTION', 32, "Evaluation of this constan t expression causes exception");
617 624
618 /** 625 /**
619 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 626 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
620 * uncaught exception being thrown. 627 * uncaught exception being thrown.
621 */ 628 */
622 static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = const CompileTimeE rrorCode.con1('CONST_EVAL_THROWS_IDBZE', 32, "Evaluation of this constant expres sion throws IntegerDivisionByZeroException"); 629 static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = const CompileTimeE rrorCode.con1('CONST_EVAL_THROWS_IDBZE', 33, "Evaluation of this constant expres sion throws IntegerDivisionByZeroException");
623 630
624 /** 631 /**
625 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S&lt;U<sub>1</sub>, & hellip;, 632 * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S&lt;U<sub>1</sub>, & hellip;,
626 * U<sub>m</sub>&gt;</i>, let <i>R = S</i>; It is a compile time error if <i>S </i> is not a 633 * U<sub>m</sub>&gt;</i>, let <i>R = S</i>; It is a compile time error if <i>S </i> is not a
627 * generic type with <i>m</i> type parameters. 634 * generic type with <i>m</i> type parameters.
628 * 635 *
629 * @param typeName the name of the type being referenced (<i>S</i>) 636 * @param typeName the name of the type being referenced (<i>S</i>)
630 * @param parameterCount the number of type parameters that were declared 637 * @param parameterCount the number of type parameters that were declared
631 * @param argumentCount the number of type arguments provided 638 * @param argumentCount the number of type arguments provided
632 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS 639 * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS
633 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS 640 * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS
634 */ 641 */
635 static const CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = const C ompileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 33, "The type '%s ' is declared with %d type parameters, but %d type arguments were given"); 642 static const CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = const C ompileTimeErrorCode.con1('CONST_WITH_INVALID_TYPE_PARAMETERS', 34, "The type '%s ' is declared with %d type parameters, but %d type arguments were given");
636 643
637 /** 644 /**
638 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip ;, a<sub>n</sub>, 645 * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip ;, a<sub>n</sub>,
639 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, 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>, &hellip;, x<sub>n+k</sub>: a<sub>n+k</sub >)</i> it is a
640 * compile-time error if the type <i>T</i> does not declare a constant constru ctor with the same 647 * compile-time error if the type <i>T</i> does not declare a constant constru ctor with the same
641 * name as the declaration of <i>T</i>. 648 * name as the declaration of <i>T</i>.
642 */ 649 */
643 static const CompileTimeErrorCode CONST_WITH_NON_CONST = const CompileTimeErro rCode.con1('CONST_WITH_NON_CONST', 34, "The constructor being called is not a 'c onst' constructor"); 650 static const CompileTimeErrorCode CONST_WITH_NON_CONST = const CompileTimeErro rCode.con1('CONST_WITH_NON_CONST', 35, "The constructor being called is not a 'c onst' constructor");
644 651
645 /** 652 /**
646 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i> a<sub>i</sub>, 1 653 * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i> a<sub>i</sub>, 1
647 * &lt;= i &lt;= n + k</i>, is not a compile-time constant expression. 654 * &lt;= i &lt;= n + k</i>, is not a compile-time constant expression.
648 */ 655 */
649 static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = const Com pileTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 35, "Arguments of a c onstant creation must be constant expressions"); 656 static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = const Com pileTimeErrorCode.con1('CONST_WITH_NON_CONSTANT_ARGUMENT', 36, "Arguments of a c onstant creation must be constant expressions");
650 657
651 /** 658 /**
652 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current 659 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current
653 * scope, optionally followed by type arguments. 660 * scope, optionally followed by type arguments.
654 * 661 *
655 * 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>, 662 * 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>,
656 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+k</sub> )</i> it is a 663 * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+k</sub> )</i> it is a
657 * compile-time error if <i>T</i> is not a class accessible in the current sco pe, optionally 664 * compile-time error if <i>T</i> is not a class accessible in the current sco pe, optionally
658 * followed by type arguments. 665 * followed by type arguments.
659 * 666 *
660 * @param name the name of the non-type element 667 * @param name the name of the non-type element
661 */ 668 */
662 static const CompileTimeErrorCode CONST_WITH_NON_TYPE = const CompileTimeError Code.con1('CONST_WITH_NON_TYPE', 36, "The name '%s' is not a class"); 669 static const CompileTimeErrorCode CONST_WITH_NON_TYPE = const CompileTimeError Code.con1('CONST_WITH_NON_TYPE', 37, "The name '%s' is not a class");
663 670
664 /** 671 /**
665 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par ameters. 672 * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type par ameters.
666 */ 673 */
667 static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = const CompileTi meErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 37, "The constant creation cannot use a type parameter"); 674 static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = const CompileTi meErrorCode.con1('CONST_WITH_TYPE_PARAMETERS', 38, "The constant creation cannot use a type parameter");
668 675
669 /** 676 /**
670 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant 677 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant
671 * constructor declared by the type <i>T</i>. 678 * constructor declared by the type <i>T</i>.
672 * 679 *
673 * @param typeName the name of the type 680 * @param typeName the name of the type
674 * @param constructorName the name of the requested constant constructor 681 * @param constructorName the name of the requested constant constructor
675 */ 682 */
676 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = const Com pileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 38, "The class '%s' d oes not have a constant constructor '%s'"); 683 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = const Com pileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR', 39, "The class '%s' d oes not have a constant constructor '%s'");
677 684
678 /** 685 /**
679 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant 686 * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant
680 * constructor declared by the type <i>T</i>. 687 * constructor declared by the type <i>T</i>.
681 * 688 *
682 * @param typeName the name of the type 689 * @param typeName the name of the type
683 */ 690 */
684 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = c onst CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 39, " The class '%s' does not have a default constant constructor"); 691 static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = c onst CompileTimeErrorCode.con1('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 40, " The class '%s' does not have a default constant constructor");
685 692
686 /** 693 /**
687 * 15.3.1 Typedef: It is a compile-time error if any default values are specif ied in the signature 694 * 15.3.1 Typedef: It is a compile-time error if any default values are specif ied in the signature
688 * of a function type alias. 695 * of a function type alias.
689 */ 696 */
690 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 40, "Default values aren't allowed in typedefs"); 697 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 41, "Default values aren't allowed in typedefs");
691 698
692 /** 699 /**
693 * 6.2.1 Required Formals: By means of a function signature that names the par ameter and describes 700 * 6.2.1 Required Formals: By means of a function signature that names the par ameter and describes
694 * its type as a function type. It is a compile-time error if any default valu es are specified in 701 * its type as a function type. It is a compile-time error if any default valu es are specified in
695 * the signature of such a function type. 702 * the signature of such a function type.
696 */ 703 */
697 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER = const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 41, "Default values aren't allowed in function type parameters"); 704 static const CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER = const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER', 42, "Default values aren't allowed in function type parameters");
698 705
699 /** 706 /**
700 * 7.6.2 Factories: It is a compile-time error if <i>k</i> explicitly specifie s a default value 707 * 7.6.2 Factories: It is a compile-time error if <i>k</i> explicitly specifie s a default value
701 * for an optional parameter. 708 * for an optional parameter.
702 */ 709 */
703 static const CompileTimeErrorCode DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRU CTOR = const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CON STRUCTOR', 42, "Default values aren't allowed in factory constructors that redir ect to another constructor"); 710 static const CompileTimeErrorCode DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRU CTOR = const CompileTimeErrorCode.con1('DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CON STRUCTOR', 43, "Default values aren't allowed in factory constructors that redir ect to another constructor");
704 711
705 /** 712 /**
706 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name 713 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name
707 * declared in the same scope. 714 * declared in the same scope.
708 */ 715 */
709 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = const Compil eTimeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 43, "The default constructo r is already defined"); 716 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = const Compil eTimeErrorCode.con1('DUPLICATE_CONSTRUCTOR_DEFAULT', 44, "The default constructo r is already defined");
710 717
711 /** 718 /**
712 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name 719 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name
713 * declared in the same scope. 720 * declared in the same scope.
714 * 721 *
715 * @param duplicateName the name of the duplicate entity 722 * @param duplicateName the name of the duplicate entity
716 */ 723 */
717 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = const CompileTi meErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 44, "The constructor with name '% s' is already defined"); 724 static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = const CompileTi meErrorCode.con1('DUPLICATE_CONSTRUCTOR_NAME', 45, "The constructor with name '% s' is already defined");
718 725
719 /** 726 /**
720 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name 727 * 3.1 Scoping: It is a compile-time error if there is more than one entity wi th the same name
721 * declared in the same scope. 728 * declared in the same scope.
722 * 729 *
723 * 7 Classes: It is a compile-time error if a class declares two members of th e same name. 730 * 7 Classes: It is a compile-time error if a class declares two members of th e same name.
724 * 731 *
725 * 7 Classes: It is a compile-time error if a class has an instance member and a static member 732 * 7 Classes: It is a compile-time error if a class has an instance member and a static member
726 * with the same name. 733 * with the same name.
727 * 734 *
728 * @param duplicateName the name of the duplicate entity 735 * @param duplicateName the name of the duplicate entity
729 */ 736 */
730 static const CompileTimeErrorCode DUPLICATE_DEFINITION = const CompileTimeErro rCode.con1('DUPLICATE_DEFINITION', 45, "The name '%s' is already defined"); 737 static const CompileTimeErrorCode DUPLICATE_DEFINITION = const CompileTimeErro rCode.con1('DUPLICATE_DEFINITION', 46, "The name '%s' is already defined");
731 738
732 /** 739 /**
733 * 7. Classes: It is a compile-time error if a class has an instance member an d a static member 740 * 7. Classes: It is a compile-time error if a class has an instance member an d a static member
734 * with the same name. 741 * with the same name.
735 * 742 *
736 * This covers the additional duplicate definition cases where inheritance has to be considered. 743 * This covers the additional duplicate definition cases where inheritance has to be considered.
737 * 744 *
738 * @param className the name of the class that has conflicting instance/static members 745 * @param className the name of the class that has conflicting instance/static members
739 * @param name the name of the conflicting members 746 * @param name the name of the conflicting members
740 * @see #DUPLICATE_DEFINITION 747 * @see #DUPLICATE_DEFINITION
741 */ 748 */
742 static const CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = const Com pileTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 46, "The name '%s' is already defined in '%s'"); 749 static const CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = const Com pileTimeErrorCode.con1('DUPLICATE_DEFINITION_INHERITANCE', 47, "The name '%s' is already defined in '%s'");
743 750
744 /** 751 /**
745 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub> i</sub> = 752 * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub> i</sub> =
746 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the label for a named 753 * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the label for a named
747 * argument]. 754 * argument].
748 */ 755 */
749 static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = const CompileTime ErrorCode.con1('DUPLICATE_NAMED_ARGUMENT', 47, "The argument for the named param eter '%s' was already specified"); 756 static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = const CompileTime ErrorCode.con1('DUPLICATE_NAMED_ARGUMENT', 48, "The argument for the named param eter '%s' was already specified");
750 757
751 /** 758 /**
752 * SDK implementation libraries can be exported only by other SDK libraries. 759 * SDK implementation libraries can be exported only by other SDK libraries.
753 * 760 *
754 * @param uri the uri pointing to a library 761 * @param uri the uri pointing to a library
755 */ 762 */
756 static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = const CompileTimeE rrorCode.con1('EXPORT_INTERNAL_LIBRARY', 48, "The library '%s' is internal and c annot be exported"); 763 static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = const CompileTimeE rrorCode.con1('EXPORT_INTERNAL_LIBRARY', 49, "The library '%s' is internal and c annot be exported");
757 764
758 /** 765 /**
759 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 766 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
760 * not a library declaration. 767 * not a library declaration.
761 * 768 *
762 * @param uri the uri pointing to a non-library declaration 769 * @param uri the uri pointing to a non-library declaration
763 */ 770 */
764 static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = const CompileTimeErr orCode.con1('EXPORT_OF_NON_LIBRARY', 49, "The exported library '%s' must not hav e a part-of directive"); 771 static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = const CompileTimeErr orCode.con1('EXPORT_OF_NON_LIBRARY', 50, "The exported library '%s' must not hav e a part-of directive");
765 772
766 /** 773 /**
767 * Enum proposal: It is a compile-time error to subclass, mix-in or implement an enum. 774 * Enum proposal: It is a compile-time error to subclass, mix-in or implement an enum.
768 */ 775 */
769 static const CompileTimeErrorCode EXTENDS_ENUM = const CompileTimeErrorCode.co n1('EXTENDS_ENUM', 50, "Classes cannot extend an enum"); 776 static const CompileTimeErrorCode EXTENDS_ENUM = const CompileTimeErrorCode.co n1('EXTENDS_ENUM', 51, "Classes cannot extend an enum");
770 777
771 /** 778 /**
772 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes 779 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes
773 * a type expression that does not denote a class available in the lexical sco pe of <i>C</i>. 780 * a type expression that does not denote a class available in the lexical sco pe of <i>C</i>.
774 * 781 *
775 * @param typeName the name of the superclass that was not found 782 * @param typeName the name of the superclass that was not found
776 */ 783 */
777 static const CompileTimeErrorCode EXTENDS_NON_CLASS = const CompileTimeErrorCo de.con1('EXTENDS_NON_CLASS', 51, "Classes can only extend other classes"); 784 static const CompileTimeErrorCode EXTENDS_NON_CLASS = const CompileTimeErrorCo de.con1('EXTENDS_NON_CLASS', 52, "Classes can only extend other classes");
778 785
779 /** 786 /**
780 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 787 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
781 * 788 *
782 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 789 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
783 * 790 *
784 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 791 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
785 * 792 *
786 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 793 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
787 * attempt to extend or implement num. 794 * attempt to extend or implement num.
788 * 795 *
789 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 796 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
790 * 797 *
791 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 798 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
792 * 799 *
793 * @param typeName the name of the type that cannot be extended 800 * @param typeName the name of the type that cannot be extended
794 * @see #IMPLEMENTS_DISALLOWED_CLASS 801 * @see #IMPLEMENTS_DISALLOWED_CLASS
795 */ 802 */
796 static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = const CompileTime ErrorCode.con1('EXTENDS_DISALLOWED_CLASS', 52, "Classes cannot extend '%s'"); 803 static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = const CompileTime ErrorCode.con1('EXTENDS_DISALLOWED_CLASS', 53, "Classes cannot extend '%s'");
797 804
798 /** 805 /**
799 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes 806 * 7.9 Superclasses: It is a compile-time error if the extends clause of a cla ss <i>C</i> includes
800 * a deferred type expression. 807 * a deferred type expression.
801 * 808 *
802 * @param typeName the name of the type that cannot be extended 809 * @param typeName the name of the type that cannot be extended
803 * @see #IMPLEMENTS_DEFERRED_CLASS 810 * @see #IMPLEMENTS_DEFERRED_CLASS
804 * @see #MIXIN_DEFERRED_CLASS 811 * @see #MIXIN_DEFERRED_CLASS
805 */ 812 */
806 static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS = const CompileTimeEr rorCode.con1('EXTENDS_DEFERRED_CLASS', 53, "This class cannot extend the deferre d class '%s'"); 813 static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS = const CompileTimeEr rorCode.con1('EXTENDS_DEFERRED_CLASS', 54, "This class cannot extend the deferre d class '%s'");
807 814
808 /** 815 /**
809 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt; 816 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</ i> or if <i>m &gt;
810 * n</i>. 817 * n</i>.
811 * 818 *
812 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 819 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
813 * uncaught exception being thrown. 820 * uncaught exception being thrown.
814 * 821 *
815 * @param requiredCount the maximum number of positional arguments 822 * @param requiredCount the maximum number of positional arguments
816 * @param argumentCount the actual number of positional arguments given 823 * @param argumentCount the actual number of positional arguments given
817 */ 824 */
818 static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = const CompileTi meErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 54, "%d positional arguments expe cted, but %d found"); 825 static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = const CompileTi meErrorCode.con1('EXTRA_POSITIONAL_ARGUMENTS', 55, "%d positional arguments expe cted, but %d found");
819 826
820 /** 827 /**
821 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time 828 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
822 * error if more than one initializer corresponding to a given instance variab le appears in 829 * error if more than one initializer corresponding to a given instance variab le appears in
823 * <i>k</i>'s list. 830 * <i>k</i>'s list.
824 */ 831 */
825 static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = const CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 5 5, "The field '%s' cannot be initialized twice in the same constructor"); 832 static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = const CompileTimeErrorCode.con1('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 5 6, "The field '%s' cannot be initialized twice in the same constructor");
826 833
827 /** 834 /**
828 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time 835 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
829 * error if <i>k</i>'s initializer list contains an initializer for a variable that is initialized 836 * error if <i>k</i>'s initializer list contains an initializer for a variable that is initialized
830 * by means of an initializing formal of <i>k</i>. 837 * by means of an initializing formal of <i>k</i>.
831 */ 838 */
832 static const CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ ER = const CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIAL IZER', 56, "Fields cannot be initialized in both the parameter list and the init ializers"); 839 static const CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZ ER = const CompileTimeErrorCode.con1('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIAL IZER', 57, "Fields cannot be initialized in both the parameter list and the init ializers");
833 840
834 /** 841 /**
835 * 5 Variables: It is a compile-time error if a final instance variable that h as is initialized by 842 * 5 Variables: It is a compile-time error if a final instance variable that h as is initialized by
836 * means of an initializing formal of a constructor is also initialized elsewh ere in the same 843 * means of an initializing formal of a constructor is also initialized elsewh ere in the same
837 * constructor. 844 * constructor.
838 * 845 *
839 * @param name the name of the field in question 846 * @param name the name of the field in question
840 */ 847 */
841 static const CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = const Com pileTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 57, "'%s' is a final field and so can only be set once"); 848 static const CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = const Com pileTimeErrorCode.con1('FINAL_INITIALIZED_MULTIPLE_TIMES', 58, "'%s' is a final field and so can only be set once");
842 849
843 /** 850 /**
844 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by 851 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by
845 * a function other than a non-redirecting generative constructor. 852 * a function other than a non-redirecting generative constructor.
846 */ 853 */
847 static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = cons t CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 58, "Initia lizing formal fields cannot be used in factory constructors"); 854 static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = cons t CompileTimeErrorCode.con1('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 59, "Initia lizing formal fields cannot be used in factory constructors");
848 855
849 /** 856 /**
850 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by 857 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by
851 * a function other than a non-redirecting generative constructor. 858 * a function other than a non-redirecting generative constructor.
852 */ 859 */
853 static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = cons t CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 59, "Initia lizing formal fields can only be used in constructors"); 860 static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = cons t CompileTimeErrorCode.con1('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 60, "Initia lizing formal fields can only be used in constructors");
854 861
855 /** 862 /**
856 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 863 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
857 * only action is to invoke another generative constructor. 864 * only action is to invoke another generative constructor.
858 * 865 *
859 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by 866 * 7.6.1 Generative Constructors: It is a compile-time error if an initializin g formal is used by
860 * a function other than a non-redirecting generative constructor. 867 * a function other than a non-redirecting generative constructor.
861 */ 868 */
862 static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = const CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 60, "The redirecting constructor cannot have a field initializer"); 869 static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = const CompileTimeErrorCode.con1('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 61, "The redirecting constructor cannot have a field initializer");
863 870
864 /** 871 /**
865 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same 872 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
866 * name. 873 * name.
867 * 874 *
868 * @param name the conflicting name of the getter and method 875 * @param name the conflicting name of the getter and method
869 */ 876 */
870 static const CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = const Com pileTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 61, "'%s' cannot be u sed to name a getter, there is already a method with the same name"); 877 static const CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = const Com pileTimeErrorCode.con1('GETTER_AND_METHOD_WITH_SAME_NAME', 62, "'%s' cannot be u sed to name a getter, there is already a method with the same name");
871 878
872 /** 879 /**
873 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class <i>C</i> 880 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class <i>C</i>
874 * specifies a malformed type or deferred type as a superinterface. 881 * specifies a malformed type or deferred type as a superinterface.
875 * 882 *
876 * @param typeName the name of the type that cannot be extended 883 * @param typeName the name of the type that cannot be extended
877 * @see #EXTENDS_DEFERRED_CLASS 884 * @see #EXTENDS_DEFERRED_CLASS
878 * @see #MIXIN_DEFERRED_CLASS 885 * @see #MIXIN_DEFERRED_CLASS
879 */ 886 */
880 static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS = const CompileTim eErrorCode.con1('IMPLEMENTS_DEFERRED_CLASS', 62, "This class cannot implement th e deferred class '%s'"); 887 static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS = const CompileTim eErrorCode.con1('IMPLEMENTS_DEFERRED_CLASS', 63, "This class cannot implement th e deferred class '%s'");
881 888
882 /** 889 /**
883 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 890 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
884 * 891 *
885 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 892 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
886 * 893 *
887 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 894 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
888 * 895 *
889 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 896 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
890 * attempt to extend or implement num. 897 * attempt to extend or implement num.
891 * 898 *
892 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 899 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
893 * 900 *
894 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 901 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
895 * 902 *
896 * @param typeName the name of the type that cannot be implemented 903 * @param typeName the name of the type that cannot be implemented
897 * @see #EXTENDS_DISALLOWED_CLASS 904 * @see #EXTENDS_DISALLOWED_CLASS
898 */ 905 */
899 static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = const CompileT imeErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 63, "Classes cannot implement ' %s'"); 906 static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = const CompileT imeErrorCode.con1('IMPLEMENTS_DISALLOWED_CLASS', 64, "Classes cannot implement ' %s'");
900 907
901 /** 908 /**
902 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class includes 909 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class includes
903 * type dynamic. 910 * type dynamic.
904 */ 911 */
905 static const CompileTimeErrorCode IMPLEMENTS_DYNAMIC = const CompileTimeErrorC ode.con1('IMPLEMENTS_DYNAMIC', 64, "Classes cannot implement 'dynamic'"); 912 static const CompileTimeErrorCode IMPLEMENTS_DYNAMIC = const CompileTimeErrorC ode.con1('IMPLEMENTS_DYNAMIC', 65, "Classes cannot implement 'dynamic'");
906 913
907 /** 914 /**
908 * Enum proposal: It is a compile-time error to subclass, mix-in or implement an enum. 915 * Enum proposal: It is a compile-time error to subclass, mix-in or implement an enum.
909 */ 916 */
910 static const CompileTimeErrorCode IMPLEMENTS_ENUM = const CompileTimeErrorCode .con1('IMPLEMENTS_ENUM', 65, "Classes cannot implement an enum"); 917 static const CompileTimeErrorCode IMPLEMENTS_ENUM = const CompileTimeErrorCode .con1('IMPLEMENTS_ENUM', 66, "Classes cannot implement an enum");
911 918
912 /** 919 /**
913 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class <i>C</i> 920 * 7.10 Superinterfaces: It is a compile-time error if the implements clause o f a class <i>C</i>
914 * includes a type expression that does not denote a class available in the le xical scope of 921 * includes a type expression that does not denote a class available in the le xical scope of
915 * <i>C</i>. 922 * <i>C</i>.
916 * 923 *
917 * @param typeName the name of the interface that was not found 924 * @param typeName the name of the interface that was not found
918 */ 925 */
919 static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = const CompileTimeErro rCode.con1('IMPLEMENTS_NON_CLASS', 66, "Classes can only implement other classes "); 926 static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = const CompileTimeErro rCode.con1('IMPLEMENTS_NON_CLASS', 67, "Classes can only implement other classes ");
920 927
921 /** 928 /**
922 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in 929 * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in
923 * the implements clause of a class. 930 * the implements clause of a class.
924 * 931 *
925 * @param className the name of the class that is implemented more than once 932 * @param className the name of the class that is implemented more than once
926 */ 933 */
927 static const CompileTimeErrorCode IMPLEMENTS_REPEATED = const CompileTimeError Code.con1('IMPLEMENTS_REPEATED', 67, "'%s' can only be implemented once"); 934 static const CompileTimeErrorCode IMPLEMENTS_REPEATED = const CompileTimeError Code.con1('IMPLEMENTS_REPEATED', 68, "'%s' can only be implemented once");
928 935
929 /** 936 /**
930 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla ss <i>C</i> appears 937 * 7.10 Superinterfaces: It is a compile-time error if the superclass of a cla ss <i>C</i> appears
931 * in the implements clause of <i>C</i>. 938 * in the implements clause of <i>C</i>.
932 * 939 *
933 * @param className the name of the class that appears in both "extends" and " implements" clauses 940 * @param className the name of the class that appears in both "extends" and " implements" clauses
934 */ 941 */
935 static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = const CompileTimeEr rorCode.con1('IMPLEMENTS_SUPER_CLASS', 68, "'%s' cannot be used in both 'extends ' and 'implements' clauses"); 942 static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = const CompileTimeEr rorCode.con1('IMPLEMENTS_SUPER_CLASS', 69, "'%s' cannot be used in both 'extends ' and 'implements' clauses");
936 943
937 /** 944 /**
938 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the right hand side of 945 * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the right hand side of
939 * an initializer. 946 * an initializer.
940 * 947 *
941 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable 948 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable
942 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the 949 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the
943 * initializer of an instance variable. 950 * initializer of an instance variable.
944 * 951 *
945 * @param name the name of the type in question 952 * @param name the name of the type in question
946 */ 953 */
947 static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = con st CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 69, "Only static members can be accessed in initializers"); 954 static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = con st CompileTimeErrorCode.con1('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 70, "Only static members can be accessed in initializers");
948 955
949 /** 956 /**
950 * SDK implementation libraries can be imported only by other SDK libraries. 957 * SDK implementation libraries can be imported only by other SDK libraries.
951 * 958 *
952 * @param uri the uri pointing to a library 959 * @param uri the uri pointing to a library
953 */ 960 */
954 static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = const CompileTimeE rrorCode.con1('IMPORT_INTERNAL_LIBRARY', 70, "The library '%s' is internal and c annot be imported"); 961 static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = const CompileTimeE rrorCode.con1('IMPORT_INTERNAL_LIBRARY', 71, "The library '%s' is internal and c annot be imported");
955 962
956 /** 963 /**
957 * 14.1 Imports: It is a compile-time error if the specified URI of an immedia te import does not 964 * 14.1 Imports: It is a compile-time error if the specified URI of an immedia te import does not
958 * refer to a library declaration. 965 * refer to a library declaration.
959 * 966 *
960 * @param uri the uri pointing to a non-library declaration 967 * @param uri the uri pointing to a non-library declaration
961 * @see StaticWarningCode#IMPORT_OF_NON_LIBRARY 968 * @see StaticWarningCode#IMPORT_OF_NON_LIBRARY
962 */ 969 */
963 static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = const CompileTimeErr orCode.con1('IMPORT_OF_NON_LIBRARY', 71, "The imported library '%s' must not hav e a part-of directive"); 970 static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = const CompileTimeErr orCode.con1('IMPORT_OF_NON_LIBRARY', 72, "The imported library '%s' must not hav e a part-of directive");
964 971
965 /** 972 /**
966 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s ub>k</sub></i> are 973 * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<s ub>k</sub></i> are
967 * not instances of the same class <i>C</i>, for all <i>1 &lt;= k &lt;= n</i>. 974 * not instances of the same class <i>C</i>, for all <i>1 &lt;= k &lt;= n</i>.
968 * 975 *
969 * @param expressionSource the expression source code that is the unexpected t ype 976 * @param expressionSource the expression source code that is the unexpected t ype
970 * @param expectedType the name of the expected type 977 * @param expectedType the name of the expected type
971 */ 978 */
972 static const CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = const C ompileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 72, "Case express ions must have the same types, '%s' is not a '%s'"); 979 static const CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = const C ompileTimeErrorCode.con1('INCONSISTENT_CASE_EXPRESSION_TYPES', 73, "Case express ions must have the same types, '%s' is not a '%s'");
973 980
974 /** 981 /**
975 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 982 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
976 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an 983 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an
977 * instance variable declared in the immediately surrounding class. 984 * instance variable declared in the immediately surrounding class.
978 * 985 *
979 * @param id the name of the initializing formal that is not an instance varia ble in the 986 * @param id the name of the initializing formal that is not an instance varia ble in the
980 * immediately enclosing class 987 * immediately enclosing class
981 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD 988 * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD
982 */ 989 */
983 static const CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = const C ompileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 73, "'%s' is not a variable in the enclosing class"); 990 static const CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = const C ompileTimeErrorCode.con1('INITIALIZER_FOR_NON_EXISTANT_FIELD', 74, "'%s' is not a variable in the enclosing class");
984 991
985 /** 992 /**
986 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 993 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
987 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an 994 * error if <i>k</i>'s initializer list contains an initializer for a variable that is not an
988 * instance variable declared in the immediately surrounding class. 995 * instance variable declared in the immediately surrounding class.
989 * 996 *
990 * @param id the name of the initializing formal that is a static variable in the immediately 997 * @param id the name of the initializing formal that is a static variable in the immediately
991 * enclosing class 998 * enclosing class
992 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD 999 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD
993 */ 1000 */
994 static const CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = const Compile TimeErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 74, "'%s' is a static variabl e in the enclosing class, variables initialized in a constructor cannot be stati c"); 1001 static const CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = const Compile TimeErrorCode.con1('INITIALIZER_FOR_STATIC_FIELD', 75, "'%s' is a static variabl e in the enclosing class, variables initialized in a constructor cannot be stati c");
995 1002
996 /** 1003 /**
997 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a 1004 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a
998 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately 1005 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately
999 * enclosing class. 1006 * enclosing class.
1000 * 1007 *
1001 * @param id the name of the initializing formal that is not an instance varia ble in the 1008 * @param id the name of the initializing formal that is not an instance varia ble in the
1002 * immediately enclosing class 1009 * immediately enclosing class
1003 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD 1010 * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD
1004 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD 1011 * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD
1005 */ 1012 */
1006 static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD = const CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 7 5, "'%s' is not a variable in the enclosing class"); 1013 static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD = const CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 7 6, "'%s' is not a variable in the enclosing class");
1007 1014
1008 /** 1015 /**
1009 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a 1016 * 7.6.1 Generative Constructors: An initializing formal has the form <i>this. id</i>. It is a
1010 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately 1017 * compile-time error if <i>id</i> is not the name of an instance variable of the immediately
1011 * enclosing class. 1018 * enclosing class.
1012 * 1019 *
1013 * @param id the name of the initializing formal that is a static variable in the immediately 1020 * @param id the name of the initializing formal that is a static variable in the immediately
1014 * enclosing class 1021 * enclosing class
1015 * @see #INITIALIZER_FOR_STATIC_FIELD 1022 * @see #INITIALIZER_FOR_STATIC_FIELD
1016 */ 1023 */
1017 static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = const CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 76, "'%s' is a static field in the enclosing class, fields initialized in a constructor canno t be static"); 1024 static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = const CompileTimeErrorCode.con1('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 77, "'%s' is a static field in the enclosing class, fields initialized in a constructor canno t be static");
1018 1025
1019 /** 1026 /**
1020 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr action 1027 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr action
1021 * <b>this</b>.<i>id</i>. 1028 * <b>this</b>.<i>id</i>.
1022 */ 1029 */
1023 static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_FACTORY = const CompileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_FACTORY', 77, "Instance m embers cannot be accessed from a factory constructor"); 1030 static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_FACTORY = const CompileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_FACTORY', 78, "Instance m embers cannot be accessed from a factory constructor");
1024 1031
1025 /** 1032 /**
1026 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr action 1033 * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extr action
1027 * <b>this</b>.<i>id</i>. 1034 * <b>this</b>.<i>id</i>.
1028 */ 1035 */
1029 static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = const C ompileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 78, "Instance mem bers cannot be accessed from a static method"); 1036 static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = const C ompileTimeErrorCode.con1('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 79, "Instance mem bers cannot be accessed from a static method");
1030 1037
1031 /** 1038 /**
1032 * Enum proposal: It is also a compile-time error to explicitly instantiate an enum via 'new' or 1039 * Enum proposal: It is also a compile-time error to explicitly instantiate an enum via 'new' or
1033 * 'const' or to access its private fields. 1040 * 'const' or to access its private fields.
1034 */ 1041 */
1035 static const CompileTimeErrorCode INSTANTIATE_ENUM = const CompileTimeErrorCod e.con1('INSTANTIATE_ENUM', 79, "Enums cannot be instantiated"); 1042 static const CompileTimeErrorCode INSTANTIATE_ENUM = const CompileTimeErrorCod e.con1('INSTANTIATE_ENUM', 80, "Enums cannot be instantiated");
1036 1043
1037 /** 1044 /**
1038 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the 1045 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the
1039 * character @, followed by a constant expression that must be either a refere nce to a 1046 * character @, followed by a constant expression that must be either a refere nce to a
1040 * compile-time constant variable, or a call to a constant constructor. 1047 * compile-time constant variable, or a call to a constant constructor.
1041 */ 1048 */
1042 static const CompileTimeErrorCode INVALID_ANNOTATION = const CompileTimeErrorC ode.con1('INVALID_ANNOTATION', 80, "Annotation can be only constant variable or constant constructor invocation"); 1049 static const CompileTimeErrorCode INVALID_ANNOTATION = const CompileTimeErrorC ode.con1('INVALID_ANNOTATION', 81, "Annotation can be only constant variable or constant constructor invocation");
1043 1050
1044 /** 1051 /**
1045 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the 1052 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the
1046 * character @, followed by a constant expression that must be either a refere nce to a 1053 * character @, followed by a constant expression that must be either a refere nce to a
1047 * compile-time constant variable, or a call to a constant constructor. 1054 * compile-time constant variable, or a call to a constant constructor.
1048 * 1055 *
1049 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a 1056 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a
1050 * deferred prefix. 1057 * deferred prefix.
1051 */ 1058 */
1052 static const CompileTimeErrorCode INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY = c onst CompileTimeErrorCode.con1('INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY', 81, " Constant values from a deferred library cannot be used as annotations"); 1059 static const CompileTimeErrorCode INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY = c onst CompileTimeErrorCode.con1('INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY', 82, " Constant values from a deferred library cannot be used as annotations");
1053 1060
1054 /** 1061 /**
1055 * TODO(brianwilkerson) Remove this when we have decided on how to report erro rs in compile-time 1062 * TODO(brianwilkerson) Remove this when we have decided on how to report erro rs in compile-time
1056 * constants. Until then, this acts as a placeholder for more informative erro rs. 1063 * constants. Until then, this acts as a placeholder for more informative erro rs.
1057 * 1064 *
1058 * See TODOs in ConstantVisitor 1065 * See TODOs in ConstantVisitor
1059 */ 1066 */
1060 static const CompileTimeErrorCode INVALID_CONSTANT = const CompileTimeErrorCod e.con1('INVALID_CONSTANT', 82, "Invalid constant value"); 1067 static const CompileTimeErrorCode INVALID_CONSTANT = const CompileTimeErrorCod e.con1('INVALID_CONSTANT', 83, "Invalid constant value");
1061 1068
1062 /** 1069 /**
1063 * 7.6 Constructors: It is a compile-time error if the name of a constructor i s not a constructor 1070 * 7.6 Constructors: It is a compile-time error if the name of a constructor i s not a constructor
1064 * name. 1071 * name.
1065 */ 1072 */
1066 static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = const CompileTime ErrorCode.con1('INVALID_CONSTRUCTOR_NAME', 83, "Invalid constructor name"); 1073 static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = const CompileTime ErrorCode.con1('INVALID_CONSTRUCTOR_NAME', 84, "Invalid constructor name");
1067 1074
1068 /** 1075 /**
1069 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of the immediately 1076 * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of the immediately
1070 * enclosing class. 1077 * enclosing class.
1071 */ 1078 */
1072 static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = const Com pileTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 84, "The name of the immediately enclosing class expected"); 1079 static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = const Com pileTimeErrorCode.con1('INVALID_FACTORY_NAME_NOT_A_CLASS', 85, "The name of the immediately enclosing class expected");
1073 1080
1074 /** 1081 /**
1075 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable 1082 * 12.10 This: It is a compile-time error if this appears in a top-level funct ion or variable
1076 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the 1083 * initializer, in a factory constructor, or in a static method or variable in itializer, or in the
1077 * initializer of an instance variable. 1084 * initializer of an instance variable.
1078 */ 1085 */
1079 static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = const CompileTim eErrorCode.con1('INVALID_REFERENCE_TO_THIS', 85, "Invalid reference to 'this' ex pression"); 1086 static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = const CompileTim eErrorCode.con1('INVALID_REFERENCE_TO_THIS', 86, "Invalid reference to 'this' ex pression");
1080 1087
1081 /** 1088 /**
1082 * 12.6 Lists: It is a compile time error if the type argument of a constant l ist literal includes 1089 * 12.6 Lists: It is a compile time error if the type argument of a constant l ist literal includes
1083 * a type parameter. 1090 * a type parameter.
1084 * 1091 *
1085 * @name the name of the type parameter 1092 * @name the name of the type parameter
1086 */ 1093 */
1087 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = const CompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 86, "Constant l ist literals cannot include a type parameter as a type argument, such as '%s'"); 1094 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = const CompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 87, "Constant l ist literals cannot include a type parameter as a type argument, such as '%s'");
1088 1095
1089 /** 1096 /**
1090 * 12.7 Maps: It is a compile time error if the type arguments of a constant m ap literal include a 1097 * 12.7 Maps: It is a compile time error if the type arguments of a constant m ap literal include a
1091 * type parameter. 1098 * type parameter.
1092 * 1099 *
1093 * @name the name of the type parameter 1100 * @name the name of the type parameter
1094 */ 1101 */
1095 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = const C ompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 87, "Constant map literals cannot include a type parameter as a type argument, such as '%s'"); 1102 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = const C ompileTimeErrorCode.con1('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 88, "Constant map literals cannot include a type parameter as a type argument, such as '%s'");
1096 1103
1097 /** 1104 /**
1098 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 1105 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
1099 * not a library declaration. 1106 * not a library declaration.
1100 * 1107 *
1101 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is 1108 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
1102 * not a library declaration. 1109 * not a library declaration.
1103 * 1110 *
1104 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1111 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1105 * declaration. 1112 * declaration.
1106 * 1113 *
1107 * @param uri the URI that is invalid 1114 * @param uri the URI that is invalid
1108 * @see #URI_DOES_NOT_EXIST 1115 * @see #URI_DOES_NOT_EXIST
1109 */ 1116 */
1110 static const CompileTimeErrorCode INVALID_URI = const CompileTimeErrorCode.con 1('INVALID_URI', 88, "Invalid URI syntax: '%s'"); 1117 static const CompileTimeErrorCode INVALID_URI = const CompileTimeErrorCode.con 1('INVALID_URI', 89, "Invalid URI syntax: '%s'");
1111 1118
1112 /** 1119 /**
1113 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within 1120 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within
1114 * the innermost function in which <i>s<sub>b</sub></i> occurs. 1121 * the innermost function in which <i>s<sub>b</sub></i> occurs.
1115 * 1122 *
1116 * 13.14 Continue: It is a compile-time error if no such statement or case cla use 1123 * 13.14 Continue: It is a compile-time error if no such statement or case cla use
1117 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs. 1124 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs.
1118 * 1125 *
1119 * @param labelName the name of the unresolvable label 1126 * @param labelName the name of the unresolvable label
1120 */ 1127 */
1121 static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = const CompileTimeErro rCode.con1('LABEL_IN_OUTER_SCOPE', 89, "Cannot reference label '%s' declared in an outer method"); 1128 static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = const CompileTimeErro rCode.con1('LABEL_IN_OUTER_SCOPE', 90, "Cannot reference label '%s' declared in an outer method");
1122 1129
1123 /** 1130 /**
1124 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within 1131 * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</su b></i> exists within
1125 * the innermost function in which <i>s<sub>b</sub></i> occurs. 1132 * the innermost function in which <i>s<sub>b</sub></i> occurs.
1126 * 1133 *
1127 * 13.14 Continue: It is a compile-time error if no such statement or case cla use 1134 * 13.14 Continue: It is a compile-time error if no such statement or case cla use
1128 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs. 1135 * <i>s<sub>E</sub></i> exists within the innermost function in which <i>s<sub >c</sub></i> occurs.
1129 * 1136 *
1130 * @param labelName the name of the unresolvable label 1137 * @param labelName the name of the unresolvable label
1131 */ 1138 */
1132 static const CompileTimeErrorCode LABEL_UNDEFINED = const CompileTimeErrorCode .con1('LABEL_UNDEFINED', 90, "Cannot reference undefined label '%s'"); 1139 static const CompileTimeErrorCode LABEL_UNDEFINED = const CompileTimeErrorCode .con1('LABEL_UNDEFINED', 91, "Cannot reference undefined label '%s'");
1133 1140
1134 /** 1141 /**
1135 * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i> ... 1142 * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i> ...
1136 * <i>e<sub>n</sub></i>] is evaluated as follows: 1143 * <i>e<sub>n</sub></i>] is evaluated as follows:
1137 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument 1144 * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument
1138 * <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i> 1145 * <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i>
1139 * 1146 *
1140 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 1147 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
1141 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 1148 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
1142 * 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>. 1149 * 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>.
1143 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 1150 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
1144 * j &lt;= m</i>. 1151 * j &lt;= m</i>.
1145 */ 1152 */
1146 static const CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const Com pileTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 91, "The element type '%s' cannot be assigned to the list type '%s'"); 1153 static const CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const Com pileTimeErrorCode.con1('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 92, "The element type '%s' cannot be assigned to the list type '%s'");
1147 1154
1148 /** 1155 /**
1149 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> : 1156 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> :
1150 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows: 1157 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows:
1151 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second 1158 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second
1152 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i> 1159 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
1153 * 1160 *
1154 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 1161 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
1155 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 1162 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
1156 * 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>. 1163 * 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>.
1157 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 1164 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
1158 * j &lt;= m</i>. 1165 * j &lt;= m</i>.
1159 */ 1166 */
1160 static const CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = const CompileT imeErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 92, "The element type '%s' cann ot be assigned to the map key type '%s'"); 1167 static const CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = const CompileT imeErrorCode.con1('MAP_KEY_TYPE_NOT_ASSIGNABLE', 93, "The element type '%s' cann ot be assigned to the map key type '%s'");
1161 1168
1162 /** 1169 /**
1163 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> : 1170 * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</su b></i> :
1164 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows: 1171 * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is ev aluated as follows:
1165 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second 1172 * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</s ub></i> and second
1166 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i> 1173 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
1167 * 1174 *
1168 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 1175 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
1169 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 1176 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
1170 * 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>. 1177 * 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>.
1171 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 1178 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
1172 * j &lt;= m</i>. 1179 * j &lt;= m</i>.
1173 */ 1180 */
1174 static const CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = const Compil eTimeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 93, "The element type '%s' cannot be assigned to the map value type '%s'"); 1181 static const CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = const Compil eTimeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 94, "The element type '%s' cannot be assigned to the map value type '%s'");
1175 1182
1176 /** 1183 /**
1177 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member with the same name 1184 * 7 Classes: It is a compile time error if a class <i>C</i> declares a member with the same name
1178 * as <i>C</i>. 1185 * as <i>C</i>.
1179 */ 1186 */
1180 static const CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = const CompileTimeEr rorCode.con1('MEMBER_WITH_CLASS_NAME', 94, "Class members cannot have the same n ame as the enclosing class"); 1187 static const CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = const CompileTimeEr rorCode.con1('MEMBER_WITH_CLASS_NAME', 95, "Class members cannot have the same n ame as the enclosing class");
1181 1188
1182 /** 1189 /**
1183 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same 1190 * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
1184 * name. 1191 * name.
1185 * 1192 *
1186 * @param name the conflicting name of the getter and method 1193 * @param name the conflicting name of the getter and method
1187 */ 1194 */
1188 static const CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = const Com pileTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 95, "'%s' cannot be u sed to name a method, there is already a getter with the same name"); 1195 static const CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = const Com pileTimeErrorCode.con1('METHOD_AND_GETTER_WITH_SAME_NAME', 96, "'%s' cannot be u sed to name a method, there is already a getter with the same name");
1189 1196
1190 /** 1197 /**
1191 * 12.1 Constants: A constant expression is ... a constant list literal. 1198 * 12.1 Constants: A constant expression is ... a constant list literal.
1192 */ 1199 */
1193 static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = const Compil eTimeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 96, "List literals must be prefixed with 'const' when used as a constant expression"); 1200 static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = const Compil eTimeErrorCode.con1('MISSING_CONST_IN_LIST_LITERAL', 97, "List literals must be prefixed with 'const' when used as a constant expression");
1194 1201
1195 /** 1202 /**
1196 * 12.1 Constants: A constant expression is ... a constant map literal. 1203 * 12.1 Constants: A constant expression is ... a constant map literal.
1197 */ 1204 */
1198 static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = const Compile TimeErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 97, "Map literals must be pre fixed with 'const' when used as a constant expression"); 1205 static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = const Compile TimeErrorCode.con1('MISSING_CONST_IN_MAP_LITERAL', 98, "Map literals must be pre fixed with 'const' when used as a constant expression");
1199 1206
1200 /** 1207 /**
1201 * Enum proposal: It is a static warning if all of the following conditions ho ld: 1208 * Enum proposal: It is a static warning if all of the following conditions ho ld:
1202 * * The switch statement does not have a 'default' clause. 1209 * * The switch statement does not have a 'default' clause.
1203 * * The static type of <i>e</i> is an enumerated typed with elements <i>id<su b>1</sub></i>, 1210 * * The static type of <i>e</i> is an enumerated typed with elements <i>id<su b>1</sub></i>,
1204 * &hellip;, <i>id<sub>n</sub></i>. 1211 * &hellip;, <i>id<sub>n</sub></i>.
1205 * * The sets {<i>e<sub>1</sub></i>, &hellip;, <i>e<sub>k</sub></i>} and {<i>i d<sub>1</sub></i>, 1212 * * The sets {<i>e<sub>1</sub></i>, &hellip;, <i>e<sub>k</sub></i>} and {<i>i d<sub>1</sub></i>,
1206 * &hellip;, <i>id<sub>n</sub></i>} are not the same. 1213 * &hellip;, <i>id<sub>n</sub></i>} are not the same.
1207 * 1214 *
1208 * @param constantName the name of the constant that is missing 1215 * @param constantName the name of the constant that is missing
1209 */ 1216 */
1210 static const CompileTimeErrorCode MISSING_ENUM_CONSTANT_IN_SWITCH = const Comp ileTimeErrorCode.con2('MISSING_ENUM_CONSTANT_IN_SWITCH', 98, "Missing case claus e for '%s'", "Add a case clause for the missing constant or add a default clause ."); 1217 static const CompileTimeErrorCode MISSING_ENUM_CONSTANT_IN_SWITCH = const Comp ileTimeErrorCode.con2('MISSING_ENUM_CONSTANT_IN_SWITCH', 99, "Missing case claus e for '%s'", "Add a case clause for the missing constant or add a default clause .");
1211 1218
1212 /** 1219 /**
1213 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici tly declares a 1220 * 9 Mixins: It is a compile-time error if a declared or derived mixin explici tly declares a
1214 * constructor. 1221 * constructor.
1215 * 1222 *
1216 * @param typeName the name of the mixin that is invalid 1223 * @param typeName the name of the mixin that is invalid
1217 */ 1224 */
1218 static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = const CompileTi meErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 99, "The class '%s' cannot be use d as a mixin because it declares a constructor"); 1225 static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = const CompileTi meErrorCode.con1('MIXIN_DECLARES_CONSTRUCTOR', 100, "The class '%s' cannot be us ed as a mixin because it declares a constructor");
1219 1226
1220 /** 1227 /**
1221 * 9.1 Mixin Application: It is a compile-time error if the with clause of a m ixin application 1228 * 9.1 Mixin Application: It is a compile-time error if the with clause of a m ixin application
1222 * <i>C</i> includes a deferred type expression. 1229 * <i>C</i> includes a deferred type expression.
1223 * 1230 *
1224 * @param typeName the name of the type that cannot be extended 1231 * @param typeName the name of the type that cannot be extended
1225 * @see #EXTENDS_DEFERRED_CLASS 1232 * @see #EXTENDS_DEFERRED_CLASS
1226 * @see #IMPLEMENTS_DEFERRED_CLASS 1233 * @see #IMPLEMENTS_DEFERRED_CLASS
1227 */ 1234 */
1228 static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErro rCode.con1('MIXIN_DEFERRED_CLASS', 100, "This class cannot mixin the deferred cl ass '%s'"); 1235 static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErro rCode.con1('MIXIN_DEFERRED_CLASS', 101, "This class cannot mixin the deferred cl ass '%s'");
1229 1236
1230 /** 1237 /**
1231 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who se superclass is not 1238 * 9 Mixins: It is a compile-time error if a mixin is derived from a class who se superclass is not
1232 * Object. 1239 * Object.
1233 * 1240 *
1234 * @param typeName the name of the mixin that is invalid 1241 * @param typeName the name of the mixin that is invalid
1235 */ 1242 */
1236 static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = const Compi leTimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 101, "The class '%s' cann ot be used as a mixin because it extends a class other than Object"); 1243 static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = const Compi leTimeErrorCode.con1('MIXIN_INHERITS_FROM_NOT_OBJECT', 102, "The class '%s' cann ot be used as a mixin because it extends a class other than Object");
1237 1244
1238 /** 1245 /**
1239 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null. 1246 * 12.2 Null: It is a compile-time error for a class to attempt to extend or i mplement Null.
1240 * 1247 *
1241 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int. 1248 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement int.
1242 * 1249 *
1243 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double. 1250 * 12.3 Numbers: It is a compile-time error for a class to attempt to extend o r implement double.
1244 * 1251 *
1245 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to 1252 * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
1246 * attempt to extend or implement num. 1253 * attempt to extend or implement num.
1247 * 1254 *
1248 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool. 1255 * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
1249 * 1256 *
1250 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String. 1257 * 12.5 Strings: It is a compile-time error for a class to attempt to extend o r implement String.
1251 * 1258 *
1252 * @param typeName the name of the type that cannot be extended 1259 * @param typeName the name of the type that cannot be extended
1253 * @see #IMPLEMENTS_DISALLOWED_CLASS 1260 * @see #IMPLEMENTS_DISALLOWED_CLASS
1254 */ 1261 */
1255 static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = const CompileTim eErrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 102, "Classes cannot mixin '%s'"); 1262 static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS = const CompileTim eErrorCode.con1('MIXIN_OF_DISALLOWED_CLASS', 103, "Classes cannot mixin '%s'");
1256 1263
1257 /** 1264 /**
1258 * Enum proposal: It is a compile-time error to subclass, mix-in or implement an enum. 1265 * Enum proposal: It is a compile-time error to subclass, mix-in or implement an enum.
1259 */ 1266 */
1260 static const CompileTimeErrorCode MIXIN_OF_ENUM = const CompileTimeErrorCode.c on1('MIXIN_OF_ENUM', 103, "Classes cannot mixin an enum"); 1267 static const CompileTimeErrorCode MIXIN_OF_ENUM = const CompileTimeErrorCode.c on1('MIXIN_OF_ENUM', 104, "Classes cannot mixin an enum");
1261 1268
1262 /** 1269 /**
1263 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno te a class or mixin 1270 * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not deno te a class or mixin
1264 * available in the immediately enclosing scope. 1271 * available in the immediately enclosing scope.
1265 */ 1272 */
1266 static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = const CompileTimeErrorC ode.con1('MIXIN_OF_NON_CLASS', 104, "Classes can only mixin other classes"); 1273 static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = const CompileTimeErrorC ode.con1('MIXIN_OF_NON_CLASS', 105, "Classes can only mixin other classes");
1267 1274
1268 /** 1275 /**
1269 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super. 1276 * 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super.
1270 */ 1277 */
1271 static const CompileTimeErrorCode MIXIN_REFERENCES_SUPER = const CompileTimeEr rorCode.con1('MIXIN_REFERENCES_SUPER', 105, "The class '%s' cannot be used as a mixin because it references 'super'"); 1278 static const CompileTimeErrorCode MIXIN_REFERENCES_SUPER = const CompileTimeEr rorCode.con1('MIXIN_REFERENCES_SUPER', 106, "The class '%s' cannot be used as a mixin because it references 'super'");
1272 1279
1273 /** 1280 /**
1274 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno te a class available 1281 * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not deno te a class available
1275 * in the immediately enclosing scope. 1282 * in the immediately enclosing scope.
1276 */ 1283 */
1277 static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = const Comp ileTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 106, "Mixin can only be applied to class"); 1284 static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = const Comp ileTimeErrorCode.con1('MIXIN_WITH_NON_CLASS_SUPERCLASS', 107, "Mixin can only be applied to class");
1278 1285
1279 /** 1286 /**
1280 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1287 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1281 * only action is to invoke another generative constructor. 1288 * only action is to invoke another generative constructor.
1282 */ 1289 */
1283 static const CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = const CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS ', 107, "Constructor may have at most one 'this' redirection"); 1290 static const CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = const CompileTimeErrorCode.con1('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS ', 108, "Constructor may have at most one 'this' redirection");
1284 1291
1285 /** 1292 /**
1286 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th en <i>k</i> may 1293 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Th en <i>k</i> may
1287 * include at most one superinitializer in its initializer list or a compile t ime error occurs. 1294 * include at most one superinitializer in its initializer list or a compile t ime error occurs.
1288 */ 1295 */
1289 static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = const CompileT imeErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 108, "Constructor may have at m ost one 'super' initializer"); 1296 static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = const CompileT imeErrorCode.con1('MULTIPLE_SUPER_INITIALIZERS', 109, "Constructor may have at m ost one 'super' initializer");
1290 1297
1291 /** 1298 /**
1292 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the 1299 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the
1293 * character @, followed by a constant expression that must be either a refere nce to a 1300 * character @, followed by a constant expression that must be either a refere nce to a
1294 * compile-time constant variable, or a call to a constant constructor. 1301 * compile-time constant variable, or a call to a constant constructor.
1295 */ 1302 */
1296 static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = const CompileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 109, "Annotatio n creation must have arguments"); 1303 static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = const CompileTimeErrorCode.con1('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 110, "Annotatio n creation must have arguments");
1297 1304
1298 /** 1305 /**
1299 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli cit superinitializer 1306 * 7.6.1 Generative Constructors: If no superinitializer is provided, an impli cit superinitializer
1300 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li st, unless the 1307 * of the form <b>super</b>() is added at the end of <i>k</i>'s initializer li st, unless the
1301 * enclosing class is class <i>Object</i>. 1308 * enclosing class is class <i>Object</i>.
1302 * 1309 *
1303 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a 1310 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a
1304 * generative constructor named <i>S</i> (respectively <i>S.id</i>) 1311 * generative constructor named <i>S</i> (respectively <i>S.id</i>)
1305 */ 1312 */
1306 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = cons t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 110, "The c lass '%s' does not have a default constructor"); 1313 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = cons t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 111, "The c lass '%s' does not have a default constructor");
1307 1314
1308 /** 1315 /**
1309 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it implicitly has a 1316 * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it implicitly has a
1310 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj ect</i>. 1317 * default constructor C() : <b>super<b>() {}, unless <i>C</i> is class <i>Obj ect</i>.
1311 * 1318 *
1312 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a 1319 * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a
1313 * generative constructor named <i>S</i> (respectively <i>S.id</i>) 1320 * generative constructor named <i>S</i> (respectively <i>S.id</i>)
1314 */ 1321 */
1315 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = cons t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 111, "The c lass '%s' does not have a default constructor"); 1322 static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = cons t CompileTimeErrorCode.con1('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 112, "The c lass '%s' does not have a default constructor");
1316 1323
1317 /** 1324 /**
1318 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma p literal that has 1325 * 13.2 Expression Statements: It is a compile-time error if a non-constant ma p literal that has
1319 * no explicit type arguments appears in a place where a statement is expected . 1326 * no explicit type arguments appears in a place where a statement is expected .
1320 */ 1327 */
1321 static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = cons t CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 112, "A non -constant map literal without type arguments cannot be used as an expression sta tement"); 1328 static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = cons t CompileTimeErrorCode.con1('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 113, "A non -constant map literal without type arguments cannot be used as an expression sta tement");
1322 1329
1323 /** 1330 /**
1324 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip; 1331 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip;
1325 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip; 1332 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip;
1326 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s ub>}</i> or the form 1333 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s ub>}</i> or the form
1327 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>: 1334 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>:
1328 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>: 1335 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>:
1329 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not 1336 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not
1330 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>. 1337 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>.
1331 */ 1338 */
1332 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = const Compile TimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 113, "Case expressions must b e constant"); 1339 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = const Compile TimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION', 114, "Case expressions must b e constant");
1333 1340
1334 /** 1341 /**
1335 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip; 1342 * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub >11</sub> &hellip;
1336 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip; 1343 * label<sub>1j1</sub> case e<sub>1</sub>: s<sub>1</sub> &hellip; label<sub>n1 </sub> &hellip;
1337 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s ub>}</i> or the form 1344 * label<sub>njn</sub> case e<sub>n</sub>: s<sub>n</sub> default: s<sub>n+1</s ub>}</i> or the form
1338 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>: 1345 * <i>switch (e) { label<sub>11</sub> &hellip; label<sub>1j1</sub> case e<sub> 1</sub>:
1339 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>: 1346 * s<sub>1</sub> &hellip; label<sub>n1</sub> &hellip; label<sub>njn</sub> case e<sub>n</sub>:
1340 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not 1347 * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub> k</sub></i> are not
1341 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>. 1348 * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>.
1342 * 1349 *
1343 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a 1350 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a
1344 * deferred prefix. 1351 * deferred prefix.
1345 */ 1352 */
1346 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_L IBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION_FROM_DEFE RRED_LIBRARY', 114, "Constant values from a deferred library cannot be used as a case expression"); 1353 static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_L IBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_CASE_EXPRESSION_FROM_DEFE RRED_LIBRARY', 115, "Constant values from a deferred library cannot be used as a case expression");
1347 1354
1348 /** 1355 /**
1349 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional 1356 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional
1350 * parameter is not a compile-time constant. 1357 * parameter is not a compile-time constant.
1351 */ 1358 */
1352 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = const CompileTi meErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 115, "Default values of an option al parameter must be constant"); 1359 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = const CompileTi meErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE', 116, "Default values of an option al parameter must be constant");
1353 1360
1354 /** 1361 /**
1355 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional 1362 * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional
1356 * parameter is not a compile-time constant. 1363 * parameter is not a compile-time constant.
1357 * 1364 *
1358 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a 1365 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a
1359 * deferred prefix. 1366 * deferred prefix.
1360 */ 1367 */
1361 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIB RARY = const CompileTimeErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED _LIBRARY', 116, "Constant values from a deferred library cannot be used as a def ault parameter value"); 1368 static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIB RARY = const CompileTimeErrorCode.con1('NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED _LIBRARY', 117, "Constant values from a deferred library cannot be used as a def ault parameter value");
1362 1369
1363 /** 1370 /**
1364 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a 1371 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a
1365 * compile-time constant. 1372 * compile-time constant.
1366 */ 1373 */
1367 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = const CompileTim eErrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 117, "'const' lists must have all c onstant values"); 1374 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = const CompileTim eErrorCode.con1('NON_CONSTANT_LIST_ELEMENT', 118, "'const' lists must have all c onstant values");
1368 1375
1369 /** 1376 /**
1370 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a 1377 * 12.6 Lists: It is a compile time error if an element of a constant list lit eral is not a
1371 * compile-time constant. 1378 * compile-time constant.
1372 * 1379 *
1373 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a 1380 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a
1374 * deferred prefix. 1381 * deferred prefix.
1375 */ 1382 */
1376 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBR ARY = const CompileTimeErrorCode.con1('NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_L IBRARY', 118, "Constant values from a deferred library cannot be used as values in a 'const' list"); 1383 static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBR ARY = const CompileTimeErrorCode.con1('NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_L IBRARY', 119, "Constant values from a deferred library cannot be used as values in a 'const' list");
1377 1384
1378 /** 1385 /**
1379 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map 1386 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map
1380 * literal is not a compile-time constant. 1387 * literal is not a compile-time constant.
1381 */ 1388 */
1382 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = const CompileTimeErro rCode.con1('NON_CONSTANT_MAP_KEY', 119, "The keys in a map must be constant"); 1389 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = const CompileTimeErro rCode.con1('NON_CONSTANT_MAP_KEY', 120, "The keys in a map must be constant");
1383 1390
1384 /** 1391 /**
1385 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map 1392 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map
1386 * literal is not a compile-time constant. 1393 * literal is not a compile-time constant.
1387 * 1394 *
1388 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a 1395 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a
1389 * deferred prefix. 1396 * deferred prefix.
1390 */ 1397 */
1391 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY', 1 20, "Constant values from a deferred library cannot be used as keys in a map"); 1398 static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY', 1 21, "Constant values from a deferred library cannot be used as keys in a map");
1392 1399
1393 /** 1400 /**
1394 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map 1401 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map
1395 * literal is not a compile-time constant. 1402 * literal is not a compile-time constant.
1396 */ 1403 */
1397 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = const CompileTimeEr rorCode.con1('NON_CONSTANT_MAP_VALUE', 121, "The values in a 'const' map must be constant"); 1404 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = const CompileTimeEr rorCode.con1('NON_CONSTANT_MAP_VALUE', 122, "The values in a 'const' map must be constant");
1398 1405
1399 /** 1406 /**
1400 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map 1407 * 12.7 Maps: It is a compile time error if either a key or a value of an entr y in a constant map
1401 * literal is not a compile-time constant. 1408 * literal is not a compile-time constant.
1402 * 1409 *
1403 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a 1410 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a
1404 * deferred prefix. 1411 * deferred prefix.
1405 */ 1412 */
1406 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY ', 122, "Constant values from a deferred library cannot be used as values in a ' const' map"); 1413 static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY ', 123, "Constant values from a deferred library cannot be used as values in a ' const' map");
1407 1414
1408 /** 1415 /**
1409 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the 1416 * 11 Metadata: Metadata consists of a series of annotations, each of which be gin with the
1410 * character @, followed by a constant expression that must be either a refere nce to a 1417 * character @, followed by a constant expression that must be either a refere nce to a
1411 * compile-time constant variable, or a call to a constant constructor. 1418 * compile-time constant variable, or a call to a constant constructor.
1412 * 1419 *
1413 * "From deferred library" case is covered by 1420 * "From deferred library" case is covered by
1414 * [CompileTimeErrorCode#INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY]. 1421 * [CompileTimeErrorCode#INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY].
1415 */ 1422 */
1416 static const CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = const CompileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 123, "Annotatio n creation can use only 'const' constructor"); 1423 static const CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = const CompileTimeErrorCode.con1('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 124, "Annotatio n creation can use only 'const' constructor");
1417 1424
1418 /** 1425 /**
1419 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a 1426 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a
1420 * constant constructor must be a potentially constant expression, or a compil e-time error occurs. 1427 * constant constructor must be a potentially constant expression, or a compil e-time error occurs.
1421 */ 1428 */
1422 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = const Co mpileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 124, "Initializer e xpressions in constant constructors must be constants"); 1429 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = const Co mpileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER', 125, "Initializer e xpressions in constant constructors must be constants");
1423 1430
1424 /** 1431 /**
1425 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a 1432 * 7.6.3 Constant Constructors: Any expression that appears within the initial izer list of a
1426 * constant constructor must be a potentially constant expression, or a compil e-time error occurs. 1433 * constant constructor must be a potentially constant expression, or a compil e-time error occurs.
1427 * 1434 *
1428 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a 1435 * 12.1 Constants: A qualified reference to a static constant variable that is not qualified by a
1429 * deferred prefix. 1436 * deferred prefix.
1430 */ 1437 */
1431 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFER RED_LIBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER _FROM_DEFERRED_LIBRARY', 125, "Constant values from a deferred library cannot be used as constant initializers"); 1438 static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFER RED_LIBRARY = const CompileTimeErrorCode.con1('NON_CONSTANT_VALUE_IN_INITIALIZER _FROM_DEFERRED_LIBRARY', 126, "Constant values from a deferred library cannot be used as constant initializers");
1432 1439
1433 /** 1440 /**
1434 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>. 1441 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
1435 * 1442 *
1436 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 1443 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
1437 * uncaught exception being thrown. 1444 * uncaught exception being thrown.
1438 * 1445 *
1439 * @param requiredCount the expected number of required arguments 1446 * @param requiredCount the expected number of required arguments
1440 * @param argumentCount the actual number of positional arguments given 1447 * @param argumentCount the actual number of positional arguments given
1441 */ 1448 */
1442 static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const Compil eTimeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 126, "%d required argument( s) expected, but %d found"); 1449 static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = const Compil eTimeErrorCode.con1('NOT_ENOUGH_REQUIRED_ARGUMENTS', 127, "%d required argument( s) expected, but %d found");
1443 1450
1444 /** 1451 /**
1445 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1452 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1446 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1453 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
1447 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 1454 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
1448 * (respectively <i>S.id</i>) 1455 * (respectively <i>S.id</i>)
1449 */ 1456 */
1450 static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = const CompileTi meErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 127, "The generative constructor '%s' expected, but factory found"); 1457 static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = const CompileTi meErrorCode.con1('NON_GENERATIVE_CONSTRUCTOR', 128, "The generative constructor '%s' expected, but factory found");
1451 1458
1452 /** 1459 /**
1453 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f or class Object. 1460 * 7.9 Superclasses: It is a compile-time error to specify an extends clause f or class Object.
1454 */ 1461 */
1455 static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = const C ompileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 128, ""); 1462 static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = const C ompileTimeErrorCode.con1('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 129, "");
1456 1463
1457 /** 1464 /**
1458 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete r in an operator. 1465 * 7.1.1 Operators: It is a compile-time error to declare an optional paramete r in an operator.
1459 */ 1466 */
1460 static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = const Compi leTimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 129, "Optional parameters are not allowed when defining an operator"); 1467 static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = const Compi leTimeErrorCode.con1('OPTIONAL_PARAMETER_IN_OPERATOR', 130, "Optional parameters are not allowed when defining an operator");
1461 1468
1462 /** 1469 /**
1463 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1470 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1464 * declaration. 1471 * declaration.
1465 * 1472 *
1466 * @param uri the uri pointing to a non-library declaration 1473 * @param uri the uri pointing to a non-library declaration
1467 */ 1474 */
1468 static const CompileTimeErrorCode PART_OF_NON_PART = const CompileTimeErrorCod e.con1('PART_OF_NON_PART', 130, "The included part '%s' must have a part-of dire ctive"); 1475 static const CompileTimeErrorCode PART_OF_NON_PART = const CompileTimeErrorCod e.con1('PART_OF_NON_PART', 131, "The included part '%s' must have a part-of dire ctive");
1469 1476
1470 /** 1477 /**
1471 * 14.1 Imports: It is a compile-time error if the current library declares a top-level member 1478 * 14.1 Imports: It is a compile-time error if the current library declares a top-level member
1472 * named <i>p</i>. 1479 * named <i>p</i>.
1473 */ 1480 */
1474 static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = cons t CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 131, "The n ame '%s' is already used as an import prefix and cannot be used to name a top-le vel element"); 1481 static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = cons t CompileTimeErrorCode.con1('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 132, "The n ame '%s' is already used as an import prefix and cannot be used to name a top-le vel element");
1475 1482
1476 /** 1483 /**
1477 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o ptional parameter 1484 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named o ptional parameter
1478 * begins with an '_' character. 1485 * begins with an '_' character.
1479 */ 1486 */
1480 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = const CompileTi meErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 132, "Named optional parameters c annot start with an underscore"); 1487 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = const CompileTi meErrorCode.con1('PRIVATE_OPTIONAL_PARAMETER', 133, "Named optional parameters c annot start with an underscore");
1481 1488
1482 /** 1489 /**
1483 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression 1490 * 12.1 Constants: It is a compile-time error if the value of a compile-time c onstant expression
1484 * depends on itself. 1491 * depends on itself.
1485 */ 1492 */
1486 static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = const Comp ileTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 133, ""); 1493 static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = const Comp ileTimeErrorCode.con1('RECURSIVE_COMPILE_TIME_CONSTANT', 134, "");
1487 1494
1488 /** 1495 /**
1489 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1496 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1490 * only action is to invoke another generative constructor. 1497 * only action is to invoke another generative constructor.
1491 * 1498 *
1492 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti me error" in 1499 * TODO(scheglov) review this later, there are no explicit "it is a compile-ti me error" in
1493 * specification. But it was added to the co19 and there is same error for fac tories. 1500 * specification. But it was added to the co19 and there is same error for fac tories.
1494 * 1501 *
1495 * https://code.google.com/p/dart/issues/detail?id=954 1502 * https://code.google.com/p/dart/issues/detail?id=954
1496 */ 1503 */
1497 static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = const Compi leTimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 134, "Cycle in redirectin g generative constructors"); 1504 static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = const Compi leTimeErrorCode.con1('RECURSIVE_CONSTRUCTOR_REDIRECT', 135, "Cycle in redirectin g generative constructors");
1498 1505
1499 /** 1506 /**
1500 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to 1507 * 7.6.2 Factories: It is a compile-time error if a redirecting factory constr uctor redirects to
1501 * itself, either directly or indirectly via a sequence of redirections. 1508 * itself, either directly or indirectly via a sequence of redirections.
1502 */ 1509 */
1503 static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = const CompileTi meErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 135, "Cycle in redirecting factor y constructors"); 1510 static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = const CompileTi meErrorCode.con1('RECURSIVE_FACTORY_REDIRECT', 136, "Cycle in redirecting factor y constructors");
1504 1511
1505 /** 1512 /**
1506 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1513 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1507 * superinterface of itself. 1514 * superinterface of itself.
1508 * 1515 *
1509 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1516 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1510 * 1517 *
1511 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1518 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1512 * 1519 *
1513 * @param className the name of the class that implements itself recursively 1520 * @param className the name of the class that implements itself recursively
1514 * @param strImplementsPath a string representation of the implements loop 1521 * @param strImplementsPath a string representation of the implements loop
1515 */ 1522 */
1516 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = const Comp ileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 136, "'%s' cannot be a superinterface of itself: %s"); 1523 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = const Comp ileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE', 137, "'%s' cannot be a superinterface of itself: %s");
1517 1524
1518 /** 1525 /**
1519 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1526 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1520 * superinterface of itself. 1527 * superinterface of itself.
1521 * 1528 *
1522 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1529 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1523 * 1530 *
1524 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1531 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1525 * 1532 *
1526 * @param className the name of the class that implements itself recursively 1533 * @param className the name of the class that implements itself recursively
1527 */ 1534 */
1528 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX TENDS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CA SE_EXTENDS', 137, "'%s' cannot extend itself"); 1535 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EX TENDS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CA SE_EXTENDS', 138, "'%s' cannot extend itself");
1529 1536
1530 /** 1537 /**
1531 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1538 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1532 * superinterface of itself. 1539 * superinterface of itself.
1533 * 1540 *
1534 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1541 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1535 * 1542 *
1536 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1543 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1537 * 1544 *
1538 * @param className the name of the class that implements itself recursively 1545 * @param className the name of the class that implements itself recursively
1539 */ 1546 */
1540 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM PLEMENTS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE _CASE_IMPLEMENTS', 138, "'%s' cannot implement itself"); 1547 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IM PLEMENTS = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE _CASE_IMPLEMENTS', 139, "'%s' cannot implement itself");
1541 1548
1542 /** 1549 /**
1543 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a 1550 * 7.10 Superinterfaces: It is a compile-time error if the interface of a clas s <i>C</i> is a
1544 * superinterface of itself. 1551 * superinterface of itself.
1545 * 1552 *
1546 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself. 1553 * 8.1 Superinterfaces: It is a compile-time error if an interface is a superi nterface of itself.
1547 * 1554 *
1548 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself. 1555 * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a super class of itself.
1549 * 1556 *
1550 * @param className the name of the class that implements itself recursively 1557 * @param className the name of the class that implements itself recursively
1551 */ 1558 */
1552 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WI TH = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_ WITH', 139, "'%s' cannot use itself as a mixin"); 1559 static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WI TH = const CompileTimeErrorCode.con1('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_ WITH', 140, "'%s' cannot use itself as a mixin");
1553 1560
1554 /** 1561 /**
1555 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but 1562 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but
1556 * <i>k'</i> is not a constant constructor. 1563 * <i>k'</i> is not a constant constructor.
1557 */ 1564 */
1558 static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = const Comp ileTimeErrorCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 140, "The constructor ' %s' could not be found in '%s'"); 1565 static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR = const Comp ileTimeErrorCode.con1('REDIRECT_TO_MISSING_CONSTRUCTOR', 141, "The constructor ' %s' could not be found in '%s'");
1559 1566
1560 /** 1567 /**
1561 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but 1568 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but
1562 * <i>k'</i> is not a constant constructor. 1569 * <i>k'</i> is not a constant constructor.
1563 */ 1570 */
1564 static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS = const CompileTimeErr orCode.con1('REDIRECT_TO_NON_CLASS', 141, "The name '%s' is not a type and canno t be used in a redirected constructor"); 1571 static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS = const CompileTimeErr orCode.con1('REDIRECT_TO_NON_CLASS', 142, "The name '%s' is not a type and canno t be used in a redirected constructor");
1565 1572
1566 /** 1573 /**
1567 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but 1574 * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with th e const modifier but
1568 * <i>k'</i> is not a constant constructor. 1575 * <i>k'</i> is not a constant constructor.
1569 */ 1576 */
1570 static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = const Co mpileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 142, "Constant fact ory constructor cannot delegate to a non-constant constructor"); 1577 static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = const Co mpileTimeErrorCode.con1('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 143, "Constant fact ory constructor cannot delegate to a non-constant constructor");
1571 1578
1572 /** 1579 /**
1573 * 7.6.1 Generative constructors: A generative constructor may be <i>redirecti ng</i>, in which 1580 * 7.6.1 Generative constructors: A generative constructor may be <i>redirecti ng</i>, in which
1574 * case its only action is to invoke another generative constructor. 1581 * case its only action is to invoke another generative constructor.
1575 */ 1582 */
1576 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR = const CompileTimeErrorCode.con1('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', 1 43, "The constructor '%s' could not be found in '%s'"); 1583 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR = const CompileTimeErrorCode.con1('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR', 1 44, "The constructor '%s' could not be found in '%s'");
1577 1584
1578 /** 1585 /**
1579 * 7.6.1 Generative constructors: A generative constructor may be <i>redirecti ng</i>, in which 1586 * 7.6.1 Generative constructors: A generative constructor may be <i>redirecti ng</i>, in which
1580 * case its only action is to invoke another generative constructor. 1587 * case its only action is to invoke another generative constructor.
1581 */ 1588 */
1582 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTR UCTOR = const CompileTimeErrorCode.con1('REDIRECT_GENERATIVE_TO_NON_GENERATIVE_C ONSTRUCTOR', 144, "Generative constructor cannot redirect to a factory construct or"); 1589 static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTR UCTOR = const CompileTimeErrorCode.con1('REDIRECT_GENERATIVE_TO_NON_GENERATIVE_C ONSTRUCTOR', 145, "Generative constructor cannot redirect to a factory construct or");
1583 1590
1584 /** 1591 /**
1585 * 5 Variables: A local variable may only be referenced at a source code locat ion that is after 1592 * 5 Variables: A local variable may only be referenced at a source code locat ion that is after
1586 * its initializer, if any, is complete, or a compile-time error occurs. 1593 * its initializer, if any, is complete, or a compile-time error occurs.
1587 */ 1594 */
1588 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = const Compil eTimeErrorCode.con1('REFERENCED_BEFORE_DECLARATION', 145, "Local variables canno t be referenced before they are declared"); 1595 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = const Compil eTimeErrorCode.con1('REFERENCED_BEFORE_DECLARATION', 146, "Local variables canno t be referenced before they are declared");
1589 1596
1590 /** 1597 /**
1591 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i> rethrow;</i> is not 1598 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i> rethrow;</i> is not
1592 * enclosed within a on-catch clause. 1599 * enclosed within a on-catch clause.
1593 */ 1600 */
1594 static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = const CompileTimeErr orCode.con1('RETHROW_OUTSIDE_CATCH', 146, "rethrow must be inside of a catch cla use"); 1601 static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = const CompileTimeErr orCode.con1('RETHROW_OUTSIDE_CATCH', 147, "rethrow must be inside of a catch cla use");
1595 1602
1596 /** 1603 /**
1597 * 13.12 Return: It is a compile-time error if a return statement of the form <i>return e;</i> 1604 * 13.12 Return: It is a compile-time error if a return statement of the form <i>return e;</i>
1598 * appears in a generative constructor. 1605 * appears in a generative constructor.
1599 */ 1606 */
1600 static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = const Com pileTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 147, "Constructors ca nnot return a value"); 1607 static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = const Com pileTimeErrorCode.con1('RETURN_IN_GENERATIVE_CONSTRUCTOR', 148, "Constructors ca nnot return a value");
1601 1608
1602 /** 1609 /**
1603 * 14.1 Imports: It is a compile-time error if a prefix used in a deferred imp ort is used in 1610 * 14.1 Imports: It is a compile-time error if a prefix used in a deferred imp ort is used in
1604 * another import clause. 1611 * another import clause.
1605 */ 1612 */
1606 static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX = const CompileTimeEr rorCode.con1('SHARED_DEFERRED_PREFIX', 148, "The prefix of a deferred import can not be used in other import directives"); 1613 static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX = const CompileTimeEr rorCode.con1('SHARED_DEFERRED_PREFIX', 149, "The prefix of a deferred import can not be used in other import directives");
1607 1614
1608 /** 1615 /**
1609 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form 1616 * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
1610 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip; 1617 * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n +1</sub>, &hellip;
1611 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe r method invocation 1618 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a compile-time error if a supe r method invocation
1612 * occurs in a top-level function or variable initializer, in an instance vari able initializer or 1619 * occurs in a top-level function or variable initializer, in an instance vari able initializer or
1613 * initializer list, in class Object, in a factory constructor, or in a static method or variable 1620 * initializer list, in class Object, in a factory constructor, or in a static method or variable
1614 * initializer. 1621 * initializer.
1615 */ 1622 */
1616 static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = const CompileTime ErrorCode.con1('SUPER_IN_INVALID_CONTEXT', 149, "Invalid context for 'super' inv ocation"); 1623 static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT = const CompileTime ErrorCode.con1('SUPER_IN_INVALID_CONTEXT', 150, "Invalid context for 'super' inv ocation");
1617 1624
1618 /** 1625 /**
1619 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its 1626 * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
1620 * only action is to invoke another generative constructor. 1627 * only action is to invoke another generative constructor.
1621 */ 1628 */
1622 static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = const Com pileTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 150, "The redirecting constructor cannot have a 'super' initializer"); 1629 static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR = const Com pileTimeErrorCode.con1('SUPER_IN_REDIRECTING_CONSTRUCTOR', 151, "The redirecting constructor cannot have a 'super' initializer");
1623 1630
1624 /** 1631 /**
1625 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time 1632 * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
1626 * error if a generative constructor of class Object includes a superinitializ er. 1633 * error if a generative constructor of class Object includes a superinitializ er.
1627 */ 1634 */
1628 static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = const CompileT imeErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 151, ""); 1635 static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT = const CompileT imeErrorCode.con1('SUPER_INITIALIZER_IN_OBJECT', 152, "");
1629 1636
1630 /** 1637 /**
1631 * 12.11 Instance Creation: It is a static type warning if any of the type arg uments to a 1638 * 12.11 Instance Creation: It is a static type warning if any of the type arg uments to a
1632 * constructor of a generic type <i>G</i> invoked by a new expression or a con stant object 1639 * constructor of a generic type <i>G</i> invoked by a new expression or a con stant object
1633 * expression are not subtypes of the bounds of the corresponding formal type parameters of 1640 * expression are not subtypes of the bounds of the corresponding formal type parameters of
1634 * <i>G</i>. 1641 * <i>G</i>.
1635 * 1642 *
1636 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if T is mal-bounded a 1643 * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if T is mal-bounded a
1637 * dynamic error occurs. 1644 * dynamic error occurs.
1638 * 1645 *
1639 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time constant would raise 1646 * 12.1 Constants: It is a compile-time error if evaluation of a compile-time constant would raise
1640 * an exception. 1647 * an exception.
1641 * 1648 *
1642 * @param boundedTypeName the name of the type used in the instance creation t hat should be 1649 * @param boundedTypeName the name of the type used in the instance creation t hat should be
1643 * limited by the bound as specified in the class declaration 1650 * limited by the bound as specified in the class declaration
1644 * @param boundingTypeName the name of the bounding type 1651 * @param boundingTypeName the name of the bounding type
1645 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS 1652 * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
1646 */ 1653 */
1647 static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const Co mpileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 152, "'%s' does not extend '%s'"); 1654 static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = const Co mpileTimeErrorCode.con1('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 153, "'%s' does not extend '%s'");
1648 1655
1649 /** 1656 /**
1650 * 15.3.1 Typedef: Any self reference, either directly, or recursively via ano ther typedef, is a 1657 * 15.3.1 Typedef: Any self reference, either directly, or recursively via ano ther typedef, is a
1651 * compile time error. 1658 * compile time error.
1652 */ 1659 */
1653 static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = const C ompileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 153, "Type alias cannot reference itself directly or recursively via another typedef"); 1660 static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF = const C ompileTimeErrorCode.con1('TYPE_ALIAS_CANNOT_REFERENCE_ITSELF', 154, "Type alias cannot reference itself directly or recursively via another typedef");
1654 1661
1655 /** 1662 /**
1656 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current 1663 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class access ible in the current
1657 * scope, optionally followed by type arguments. 1664 * scope, optionally followed by type arguments.
1658 */ 1665 */
1659 static const CompileTimeErrorCode UNDEFINED_CLASS = const CompileTimeErrorCode .con1('UNDEFINED_CLASS', 154, "Undefined class '%s'"); 1666 static const CompileTimeErrorCode UNDEFINED_CLASS = const CompileTimeErrorCode .con1('UNDEFINED_CLASS', 155, "Undefined class '%s'");
1660 1667
1661 /** 1668 /**
1662 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1669 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1663 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1670 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
1664 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 1671 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
1665 * (respectively <i>S.id</i>) 1672 * (respectively <i>S.id</i>)
1666 */ 1673 */
1667 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = const CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 155, "The cla ss '%s' does not have a generative constructor '%s'"); 1674 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER = const CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER', 156, "The cla ss '%s' does not have a generative constructor '%s'");
1668 1675
1669 /** 1676 /**
1670 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears 1677 * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the super initializer appears
1671 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is 1678 * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generativ e constructor. It is
1672 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i> 1679 * a compile-time error if class <i>S</i> does not declare a generative constr uctor named <i>S</i>
1673 * (respectively <i>S.id</i>) 1680 * (respectively <i>S.id</i>)
1674 */ 1681 */
1675 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = const CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT ', 156, "The class '%s' does not have a default generative constructor"); 1682 static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = const CompileTimeErrorCode.con1('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT ', 157, "The class '%s' does not have a default generative constructor");
1676 1683
1677 /** 1684 /**
1678 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>, 1685 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>,
1679 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ... 1686 * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i > ...
1680 * <i>p<sub>n+k</sub></i>} or a static warning occurs. 1687 * <i>p<sub>n+k</sub></i>} or a static warning occurs.
1681 * 1688 *
1682 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an 1689 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
1683 * uncaught exception being thrown. 1690 * uncaught exception being thrown.
1684 * 1691 *
1685 * @param name the name of the requested named parameter 1692 * @param name the name of the requested named parameter
1686 */ 1693 */
1687 static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = const CompileTim eErrorCode.con1('UNDEFINED_NAMED_PARAMETER', 157, "The named parameter '%s' is n ot defined"); 1694 static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = const CompileTim eErrorCode.con1('UNDEFINED_NAMED_PARAMETER', 158, "The named parameter '%s' is n ot defined");
1688 1695
1689 /** 1696 /**
1690 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is 1697 * 14.2 Exports: It is a compile-time error if the compilation unit found at t he specified URI is
1691 * not a library declaration. 1698 * not a library declaration.
1692 * 1699 *
1693 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is 1700 * 14.1 Imports: It is a compile-time error if the compilation unit found at t he specified URI is
1694 * not a library declaration. 1701 * not a library declaration.
1695 * 1702 *
1696 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part 1703 * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
1697 * declaration. 1704 * declaration.
1698 * 1705 *
1699 * @param uri the URI pointing to a non-existent file 1706 * @param uri the URI pointing to a non-existent file
1700 * @see #INVALID_URI 1707 * @see #INVALID_URI
1701 */ 1708 */
1702 static const CompileTimeErrorCode URI_DOES_NOT_EXIST = const CompileTimeErrorC ode.con1('URI_DOES_NOT_EXIST', 158, "Target of URI does not exist: '%s'"); 1709 static const CompileTimeErrorCode URI_DOES_NOT_EXIST = const CompileTimeErrorC ode.con1('URI_DOES_NOT_EXIST', 159, "Target of URI does not exist: '%s'");
1703 1710
1704 /** 1711 /**
1705 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if 1712 * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if
1706 * <i>x</i> involves string interpolation. 1713 * <i>x</i> involves string interpolation.
1707 * 1714 *
1708 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if 1715 * 14.3 Parts: It is a compile-time error if <i>s</i> is not a compile-time co nstant, or if
1709 * <i>s</i> involves string interpolation. 1716 * <i>s</i> involves string interpolation.
1710 * 1717 *
1711 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is 1718 * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that d escribes a URI is
1712 * not a compile-time constant, or if <i>x</i> involves string interpolation. 1719 * not a compile-time constant, or if <i>x</i> involves string interpolation.
1713 */ 1720 */
1714 static const CompileTimeErrorCode URI_WITH_INTERPOLATION = const CompileTimeEr rorCode.con1('URI_WITH_INTERPOLATION', 159, "URIs cannot use string interpolatio n"); 1721 static const CompileTimeErrorCode URI_WITH_INTERPOLATION = const CompileTimeEr rorCode.con1('URI_WITH_INTERPOLATION', 160, "URIs cannot use string interpolatio n");
1715 1722
1716 /** 1723 /**
1717 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator []= is 1724 * 7.1.1 Operators: It is a compile-time error if the arity of the user-declar ed operator []= is
1718 * not 2. It is a compile time error if the arity of a user-declared operator with one of the 1725 * not 2. It is a compile time error if the arity of a user-declared operator with one of the
1719 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, [] is not 1. 1726 * names: &lt;, &gt;, &lt;=, &gt;=, ==, +, /, ~/, *, %, |, ^, &, &lt;&lt;, &gt ;&gt;, [] is not 1.
1720 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a 1727 * It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a
1721 * compile time error if the arity of the user-declared operator ~ is not 0. 1728 * compile time error if the arity of the user-declared operator ~ is not 0.
1722 * 1729 *
1723 * @param operatorName the name of the declared operator 1730 * @param operatorName the name of the declared operator
1724 * @param expectedNumberOfParameters the number of parameters expected 1731 * @param expectedNumberOfParameters the number of parameters expected
1725 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration 1732 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration
1726 */ 1733 */
1727 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = co nst CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 160, "O perator '%s' should declare exactly %d parameter(s), but %d found"); 1734 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = co nst CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 161, "O perator '%s' should declare exactly %d parameter(s), but %d found");
1728 1735
1729 /** 1736 /**
1730 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar ed operator - is not 1737 * 7.1.1 Operators: It is a compile time error if the arity of the user-declar ed operator - is not
1731 * 0 or 1. 1738 * 0 or 1.
1732 * 1739 *
1733 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration 1740 * @param actualNumberOfParameters the number of parameters found in the opera tor declaration
1734 */ 1741 */
1735 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU S = const CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MIN US', 161, "Operator '-' should declare 0 or 1 parameter, but %d found"); 1742 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINU S = const CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MIN US', 162, "Operator '-' should declare 0 or 1 parameter, but %d found");
1736 1743
1737 /** 1744 /**
1738 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include 1745 * 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include
1739 * exactly one required formal parameter <i>p</i>. 1746 * exactly one required formal parameter <i>p</i>.
1740 */ 1747 */
1741 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = cons t CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 162, "Sette rs should declare exactly one required parameter"); 1748 static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = cons t CompileTimeErrorCode.con1('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 163, "Sette rs should declare exactly one required parameter");
1742 1749
1743 static const List<CompileTimeErrorCode> values = const [ 1750 static const List<CompileTimeErrorCode> values = const [
1744 ACCESS_PRIVATE_ENUM_FIELD, 1751 ACCESS_PRIVATE_ENUM_FIELD,
1745 AMBIGUOUS_EXPORT, 1752 AMBIGUOUS_EXPORT,
1746 ARGUMENT_DEFINITION_TEST_NON_PARAMETER, 1753 ARGUMENT_DEFINITION_TEST_NON_PARAMETER,
1747 BUILT_IN_IDENTIFIER_AS_TYPE, 1754 BUILT_IN_IDENTIFIER_AS_TYPE,
1748 BUILT_IN_IDENTIFIER_AS_TYPE_NAME, 1755 BUILT_IN_IDENTIFIER_AS_TYPE_NAME,
1749 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, 1756 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME,
1750 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, 1757 BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME,
1751 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, 1758 CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
1752 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, 1759 COMPILE_TIME_CONSTANT_RAISES_EXCEPTION,
1753 CONFLICTING_GETTER_AND_METHOD, 1760 CONFLICTING_GETTER_AND_METHOD,
1754 CONFLICTING_METHOD_AND_GETTER, 1761 CONFLICTING_METHOD_AND_GETTER,
1755 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, 1762 CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD,
1756 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, 1763 CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD,
1757 CONFLICTING_TYPE_VARIABLE_AND_CLASS, 1764 CONFLICTING_TYPE_VARIABLE_AND_CLASS,
1758 CONFLICTING_TYPE_VARIABLE_AND_MEMBER, 1765 CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
1759 CONST_CONSTRUCTOR_THROWS_EXCEPTION, 1766 CONST_CONSTRUCTOR_THROWS_EXCEPTION,
1767 CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
1760 CONST_CONSTRUCTOR_WITH_MIXIN, 1768 CONST_CONSTRUCTOR_WITH_MIXIN,
1761 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, 1769 CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER,
1762 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 1770 CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
1763 CONST_DEFERRED_CLASS, 1771 CONST_DEFERRED_CLASS,
1764 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, 1772 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
1765 CONST_FORMAL_PARAMETER, 1773 CONST_FORMAL_PARAMETER,
1766 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 1774 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
1767 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY, 1775 CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
1768 CONST_INSTANCE_FIELD, 1776 CONST_INSTANCE_FIELD,
1769 CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, 1777 CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
(...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after
4105 4113
4106 @override 4114 @override
4107 String get message => "%s"; 4115 String get message => "%s";
4108 4116
4109 @override 4117 @override
4110 ErrorType get type => ErrorType.TODO; 4118 ErrorType get type => ErrorType.TODO;
4111 4119
4112 @override 4120 @override
4113 String get uniqueName => "${runtimeType.toString()}.${name}"; 4121 String get uniqueName => "${runtimeType.toString()}.${name}";
4114 } 4122 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698