| Index: lib/compiler/implementation/warnings.dart
|
| ===================================================================
|
| --- lib/compiler/implementation/warnings.dart (revision 11400)
|
| +++ lib/compiler/implementation/warnings.dart (working copy)
|
| @@ -6,233 +6,233 @@
|
| final String template;
|
| const MessageKind(this.template);
|
|
|
| - static final GENERIC = const MessageKind('#{1}');
|
| + static const GENERIC = const MessageKind('#{1}');
|
|
|
| - static final NOT_ASSIGNABLE = const MessageKind(
|
| + static const NOT_ASSIGNABLE = const MessageKind(
|
| '#{2} is not assignable to #{1}');
|
| - static final VOID_EXPRESSION = const MessageKind(
|
| + static const VOID_EXPRESSION = const MessageKind(
|
| 'expression does not yield a value');
|
| - static final VOID_VARIABLE = const MessageKind(
|
| + static const VOID_VARIABLE = const MessageKind(
|
| 'variable cannot be of type void');
|
| - static final RETURN_VALUE_IN_VOID = const MessageKind(
|
| + static const RETURN_VALUE_IN_VOID = const MessageKind(
|
| 'cannot return value from void function');
|
| - static final RETURN_NOTHING = const MessageKind(
|
| + static const RETURN_NOTHING = const MessageKind(
|
| 'value of type #{1} expected');
|
| - static final MISSING_ARGUMENT = const MessageKind(
|
| + static const MISSING_ARGUMENT = const MessageKind(
|
| 'missing argument of type #{1}');
|
| - static final ADDITIONAL_ARGUMENT = const MessageKind(
|
| + static const ADDITIONAL_ARGUMENT = const MessageKind(
|
| 'additional argument');
|
| - static final METHOD_NOT_FOUND = const MessageKind(
|
| + static const METHOD_NOT_FOUND = const MessageKind(
|
| 'no method named #{2} in class #{1}');
|
| - static final MEMBER_NOT_STATIC = const MessageKind(
|
| + static const MEMBER_NOT_STATIC = const MessageKind(
|
| '#{1}.#{2} is not static');
|
| - static final NO_INSTANCE_AVAILABLE = const MessageKind(
|
| + static const NO_INSTANCE_AVAILABLE = const MessageKind(
|
| '#{1} is only available in instance methods');
|
|
|
| - static final UNREACHABLE_CODE = const MessageKind(
|
| + static const UNREACHABLE_CODE = const MessageKind(
|
| 'unreachable code');
|
| - static final MISSING_RETURN = const MessageKind(
|
| + static const MISSING_RETURN = const MessageKind(
|
| 'missing return');
|
| - static final MAYBE_MISSING_RETURN = const MessageKind(
|
| + static const MAYBE_MISSING_RETURN = const MessageKind(
|
| 'not all paths lead to a return or throw statement');
|
|
|
| - static final CANNOT_RESOLVE = const MessageKind(
|
| + static const CANNOT_RESOLVE = const MessageKind(
|
| 'cannot resolve #{1}');
|
| - static final CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind(
|
| + static const CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind(
|
| 'cannot resolve constructor #{1}');
|
| - static final CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind(
|
| + static const CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind(
|
| 'cannot resolve constructor #{1} for implicit super call');
|
| - static final CANNOT_RESOLVE_TYPE = const MessageKind(
|
| + static const CANNOT_RESOLVE_TYPE = const MessageKind(
|
| 'cannot resolve type #{1}');
|
| - static final DUPLICATE_DEFINITION = const MessageKind(
|
| + static const DUPLICATE_DEFINITION = const MessageKind(
|
| 'duplicate definition of #{1}');
|
| - static final NOT_A_TYPE = const MessageKind(
|
| + static const NOT_A_TYPE = const MessageKind(
|
| '#{1} is not a type');
|
| - static final NOT_A_PREFIX = const MessageKind(
|
| + static const NOT_A_PREFIX = const MessageKind(
|
| '#{1} is not a prefix');
|
| - static final NO_SUPER_IN_OBJECT = const MessageKind(
|
| + static const NO_SUPER_IN_OBJECT = const MessageKind(
|
| "'Object' does not have a superclass");
|
| - static final CANNOT_FIND_CONSTRUCTOR = const MessageKind(
|
| + static const CANNOT_FIND_CONSTRUCTOR = const MessageKind(
|
| 'cannot find constructor #{1}');
|
| - static final CANNOT_FIND_CONSTRUCTOR2 = const MessageKind(
|
| + static const CANNOT_FIND_CONSTRUCTOR2 = const MessageKind(
|
| 'cannot find constructor #{1} in #{2}');
|
| - static final CYCLIC_CLASS_HIERARCHY = const MessageKind(
|
| + static const CYCLIC_CLASS_HIERARCHY = const MessageKind(
|
| '#{1} creates a cycle in the class hierarchy');
|
| - static final INVALID_RECEIVER_IN_INITIALIZER = const MessageKind(
|
| + static const INVALID_RECEIVER_IN_INITIALIZER = const MessageKind(
|
| 'field initializer expected');
|
| - static final NO_SUPER_IN_STATIC = const MessageKind(
|
| + static const NO_SUPER_IN_STATIC = const MessageKind(
|
| "'super' is only available in instance methods");
|
| - static final DUPLICATE_INITIALIZER = const MessageKind(
|
| + static const DUPLICATE_INITIALIZER = const MessageKind(
|
| 'field #{1} is initialized more than once');
|
| - static final ALREADY_INITIALIZED = const MessageKind(
|
| + static const ALREADY_INITIALIZED = const MessageKind(
|
| '#{1} was already initialized here');
|
| - static final INIT_STATIC_FIELD = const MessageKind(
|
| + static const INIT_STATIC_FIELD = const MessageKind(
|
| 'cannot initialize static field #{1}');
|
| - static final NOT_A_FIELD = const MessageKind(
|
| + static const NOT_A_FIELD = const MessageKind(
|
| '#{1} is not a field');
|
| - static final CONSTRUCTOR_CALL_EXPECTED = const MessageKind(
|
| + static const CONSTRUCTOR_CALL_EXPECTED = const MessageKind(
|
| "only call to 'this' or 'super' constructor allowed");
|
| - static final INVALID_FOR_IN = const MessageKind(
|
| + static const INVALID_FOR_IN = const MessageKind(
|
| 'invalid for-in variable declaration.');
|
| - static final INVALID_INITIALIZER = const MessageKind(
|
| + static const INVALID_INITIALIZER = const MessageKind(
|
| 'invalid initializer');
|
| - static final FUNCTION_WITH_INITIALIZER = const MessageKind(
|
| + static const FUNCTION_WITH_INITIALIZER = const MessageKind(
|
| 'only constructors can have initializers');
|
| - static final REDIRECTING_CONSTRUCTOR_CYCLE = const MessageKind(
|
| + static const REDIRECTING_CONSTRUCTOR_CYCLE = const MessageKind(
|
| 'cyclic constructor redirection');
|
| - static final REDIRECTING_CONSTRUCTOR_HAS_BODY = const MessageKind(
|
| + static const REDIRECTING_CONSTRUCTOR_HAS_BODY = const MessageKind(
|
| 'redirecting constructor cannot have a body');
|
| - static final REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER = const MessageKind(
|
| + static const REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER = const MessageKind(
|
| 'redirecting constructor cannot have other initializers');
|
| - static final SUPER_INITIALIZER_IN_OBJECT = const MessageKind(
|
| + static const SUPER_INITIALIZER_IN_OBJECT = const MessageKind(
|
| "'Object' cannot have a super initializer");
|
| - static final DUPLICATE_SUPER_INITIALIZER = const MessageKind(
|
| + static const DUPLICATE_SUPER_INITIALIZER = const MessageKind(
|
| 'cannot have more than one super initializer');
|
| - static final NO_MATCHING_CONSTRUCTOR = const MessageKind(
|
| + static const NO_MATCHING_CONSTRUCTOR = const MessageKind(
|
| "super call arguments and constructor parameters don't match");
|
| - static final NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind(
|
| + static const NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind(
|
| "implicit super call arguments and constructor parameters don't match");
|
| - static final NO_CONSTRUCTOR = const MessageKind(
|
| + static const NO_CONSTRUCTOR = const MessageKind(
|
| '#{1} is a #{2}, not a constructor');
|
| - static final FIELD_PARAMETER_NOT_ALLOWED = const MessageKind(
|
| + static const FIELD_PARAMETER_NOT_ALLOWED = const MessageKind(
|
| 'a field parameter is only allowed in generative constructors');
|
| - static final INVALID_PARAMETER = const MessageKind(
|
| + static const INVALID_PARAMETER = const MessageKind(
|
| "cannot resolve parameter");
|
| - static final NOT_INSTANCE_FIELD = const MessageKind(
|
| + static const NOT_INSTANCE_FIELD = const MessageKind(
|
| '#{1} is not an instance field');
|
| - static final NO_CATCH_NOR_FINALLY = const MessageKind(
|
| + static const NO_CATCH_NOR_FINALLY = const MessageKind(
|
| "expected 'catch' or 'finally'");
|
| - static final EMPTY_CATCH_DECLARATION = const MessageKind(
|
| + static const EMPTY_CATCH_DECLARATION = const MessageKind(
|
| 'expected a variable in catch declaration');
|
| - static final EXTRA_CATCH_DECLARATION = const MessageKind(
|
| + static const EXTRA_CATCH_DECLARATION = const MessageKind(
|
| 'extra variable in catch declaration');
|
| - static final UNBOUND_LABEL = const MessageKind(
|
| + static const UNBOUND_LABEL = const MessageKind(
|
| 'cannot resolve label #{1}');
|
| - static final NO_BREAK_TARGET = const MessageKind(
|
| + static const NO_BREAK_TARGET = const MessageKind(
|
| 'break statement not inside switch or loop');
|
| - static final NO_CONTINUE_TARGET = const MessageKind(
|
| + static const NO_CONTINUE_TARGET = const MessageKind(
|
| 'continue statement not inside loop');
|
| - static final EXISTING_LABEL = const MessageKind(
|
| + static const EXISTING_LABEL = const MessageKind(
|
| 'original declaration of duplicate label #{1}');
|
| - static final DUPLICATE_LABEL = const MessageKind(
|
| + static const DUPLICATE_LABEL = const MessageKind(
|
| 'duplicate declaration of label #{1}');
|
| - static final UNUSED_LABEL = const MessageKind(
|
| + static const UNUSED_LABEL = const MessageKind(
|
| 'unused label #{1}');
|
| - static final INVALID_CONTINUE = const MessageKind(
|
| + static const INVALID_CONTINUE = const MessageKind(
|
| 'target of continue is not a loop or switch case');
|
| - static final TYPE_VARIABLE_AS_CONSTRUCTOR = const MessageKind(
|
| + static const TYPE_VARIABLE_AS_CONSTRUCTOR = const MessageKind(
|
| 'cannot use type variable as constructor');
|
| - static final DUPLICATE_TYPE_VARIABLE_NAME = const MessageKind(
|
| + static const DUPLICATE_TYPE_VARIABLE_NAME = const MessageKind(
|
| 'type variable #{1} already declared');
|
| - static final INVALID_BREAK = const MessageKind(
|
| + static const INVALID_BREAK = const MessageKind(
|
| 'target of break is not a statement');
|
| - static final INVALID_USE_OF_SUPER = const MessageKind(
|
| + static const INVALID_USE_OF_SUPER = const MessageKind(
|
| 'super not allowed here');
|
| - static final INVALID_CASE_DEFAULT = const MessageKind(
|
| + static const INVALID_CASE_DEFAULT = const MessageKind(
|
| 'default only allowed on last case of a switch');
|
| - static final INVALID_CASE_EXPRESSION = const MessageKind(
|
| + static const INVALID_CASE_EXPRESSION = const MessageKind(
|
| 'case expression is not a compile-time constant int or string.');
|
| - static final INVALID_CASE_EXPRESSION_TYPE = const MessageKind(
|
| + static const INVALID_CASE_EXPRESSION_TYPE = const MessageKind(
|
| "case expressions don't all have the same type "
|
| "(must be all int or String).");
|
| - static final INVALID_ARGUMENT_AFTER_NAMED = const MessageKind(
|
| + static const INVALID_ARGUMENT_AFTER_NAMED = const MessageKind(
|
| 'non-named argument after named argument');
|
|
|
| - static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind(
|
| + static const NOT_A_COMPILE_TIME_CONSTANT = const MessageKind(
|
| 'not a compile-time constant');
|
| - static final CYCLIC_COMPILE_TIME_CONSTANTS = const MessageKind(
|
| + static const CYCLIC_COMPILE_TIME_CONSTANTS = const MessageKind(
|
| 'cycle in the compile-time constant computation');
|
|
|
| - static final KEY_NOT_A_STRING_LITERAL = const MessageKind(
|
| + static const KEY_NOT_A_STRING_LITERAL = const MessageKind(
|
| 'map-literal key not a string literal');
|
|
|
| - static final NO_SUCH_LIBRARY_MEMBER = const MessageKind(
|
| + static const NO_SUCH_LIBRARY_MEMBER = const MessageKind(
|
| '#{1} has no member named #{2}');
|
|
|
| - static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind(
|
| + static const CANNOT_INSTANTIATE_INTERFACE = const MessageKind(
|
| "cannot instantiate interface '#{1}'");
|
|
|
| - static final CANNOT_INSTANTIATE_TYPEDEF = const MessageKind(
|
| + static const CANNOT_INSTANTIATE_TYPEDEF = const MessageKind(
|
| "cannot instantiate typedef '#{1}'");
|
|
|
| - static final NO_DEFAULT_CLASS = const MessageKind(
|
| + static const NO_DEFAULT_CLASS = const MessageKind(
|
| "no default class on enclosing interface '#{1}'");
|
|
|
| - static final CYCLIC_TYPE_VARIABLE = const MessageKind(
|
| + static const CYCLIC_TYPE_VARIABLE = const MessageKind(
|
| "cyclic reference to type variable #{1}");
|
| - static final TYPE_NAME_EXPECTED = const MessageKind(
|
| + static const TYPE_NAME_EXPECTED = const MessageKind(
|
| "class or interface name expected");
|
|
|
| - static final CANNOT_EXTEND = const MessageKind(
|
| + static const CANNOT_EXTEND = const MessageKind(
|
| "#{1} cannot be extended");
|
|
|
| - static final CANNOT_IMPLEMENT = const MessageKind(
|
| + static const CANNOT_IMPLEMENT = const MessageKind(
|
| "#{1} cannot be implemented");
|
|
|
| - static final ILLEGAL_SUPER_SEND = const MessageKind(
|
| + static const ILLEGAL_SUPER_SEND = const MessageKind(
|
| "#{1} cannot be called on super");
|
|
|
| - static final ADDITIONAL_TYPE_ARGUMENT = const MessageKind(
|
| + static const ADDITIONAL_TYPE_ARGUMENT = const MessageKind(
|
| "additional type argument");
|
|
|
| - static final MISSING_TYPE_ARGUMENT = const MessageKind(
|
| + static const MISSING_TYPE_ARGUMENT = const MessageKind(
|
| "missing type argument");
|
|
|
| - static final MISSING_ARGUMENTS_TO_ASSERT = const MessageKind(
|
| + static const MISSING_ARGUMENTS_TO_ASSERT = const MessageKind(
|
| "missing arguments to assert");
|
|
|
| - static final GETTER_MISMATCH = const MessageKind(
|
| + static const GETTER_MISMATCH = const MessageKind(
|
| "Error: setter disagrees on: #{1}.");
|
|
|
| - static final SETTER_MISMATCH = const MessageKind(
|
| + static const SETTER_MISMATCH = const MessageKind(
|
| "Error: getter disagrees on: #{1}.");
|
|
|
| - static final NO_STATIC_OVERRIDE = const MessageKind(
|
| + static const NO_STATIC_OVERRIDE = const MessageKind(
|
| "Error: static member cannot override instance member '#{1}' of '#{2}'.");
|
|
|
| - static final NO_STATIC_OVERRIDE_CONT = const MessageKind(
|
| + static const NO_STATIC_OVERRIDE_CONT = const MessageKind(
|
| "Info: this is the instance member that cannot be overridden "
|
| "by a static member.");
|
|
|
| - static final CANNOT_OVERRIDE_FIELD_WITH_METHOD = const MessageKind(
|
| + static const CANNOT_OVERRIDE_FIELD_WITH_METHOD = const MessageKind(
|
| "Error: method cannot override field '#{1}' of '#{2}'.");
|
|
|
| - static final CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT = const MessageKind(
|
| + static const CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT = const MessageKind(
|
| "Info: this is the field that cannot be overridden by a method.");
|
|
|
| - static final CANNOT_OVERRIDE_METHOD_WITH_FIELD = const MessageKind(
|
| + static const CANNOT_OVERRIDE_METHOD_WITH_FIELD = const MessageKind(
|
| "Error: field cannot override method '#{1}' of '#{2}'.");
|
|
|
| - static final CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind(
|
| + static const CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind(
|
| "Info: this is the method that cannot be overridden by a field.");
|
|
|
| - static final BAD_ARITY_OVERRIDE = const MessageKind(
|
| + static const BAD_ARITY_OVERRIDE = const MessageKind(
|
| "Error: cannot override method '#{1}' in '#{2}'; "
|
| "the parameters do not match.");
|
|
|
| - static final BAD_ARITY_OVERRIDE_CONT = const MessageKind(
|
| + static const BAD_ARITY_OVERRIDE_CONT = const MessageKind(
|
| "Info: this is the method whose parameters do not match.");
|
|
|
| - static final MISSING_FORMALS = const MessageKind(
|
| + static const MISSING_FORMALS = const MessageKind(
|
| "Error: Formal parameters are missing.");
|
|
|
| // TODO(ahe): Change the message below when it becomes an error.
|
| - static final EXTRA_FORMALS = const MessageKind(
|
| + static const EXTRA_FORMALS = const MessageKind(
|
| "Warning: Formal parameters will not be allowed here in M1.");
|
|
|
| - static final CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind(
|
| + static const CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind(
|
| "Error: cannot have return type for constructor.");
|
|
|
| - static final ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind(
|
| + static const ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind(
|
| "Error: cannot have final modifier on method.");
|
|
|
| - static final ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind(
|
| + static const ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind(
|
| "Error: illegal constructor modifiers: #{1}.");
|
|
|
| - static final COMPILER_CRASHED = const MessageKind(
|
| + static const COMPILER_CRASHED = const MessageKind(
|
| "Error: The compiler crashed when compiling this element.");
|
|
|
| - static final PLEASE_REPORT_THE_CRASH = const MessageKind('''
|
| + static const PLEASE_REPORT_THE_CRASH = const MessageKind('''
|
| The compiler is broken.
|
|
|
| When compiling the above element, the compiler crashed. It is not
|
|
|