| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 class MessageKind { | 5 class MessageKind { |
| 6 final String template; | 6 final String template; |
| 7 const MessageKind(this.template); | 7 const MessageKind(this.template); |
| 8 | 8 |
| 9 static final GENERIC = const MessageKind('#{1}'); | 9 static const GENERIC = const MessageKind('#{1}'); |
| 10 | 10 |
| 11 static final NOT_ASSIGNABLE = const MessageKind( | 11 static const NOT_ASSIGNABLE = const MessageKind( |
| 12 '#{2} is not assignable to #{1}'); | 12 '#{2} is not assignable to #{1}'); |
| 13 static final VOID_EXPRESSION = const MessageKind( | 13 static const VOID_EXPRESSION = const MessageKind( |
| 14 'expression does not yield a value'); | 14 'expression does not yield a value'); |
| 15 static final VOID_VARIABLE = const MessageKind( | 15 static const VOID_VARIABLE = const MessageKind( |
| 16 'variable cannot be of type void'); | 16 'variable cannot be of type void'); |
| 17 static final RETURN_VALUE_IN_VOID = const MessageKind( | 17 static const RETURN_VALUE_IN_VOID = const MessageKind( |
| 18 'cannot return value from void function'); | 18 'cannot return value from void function'); |
| 19 static final RETURN_NOTHING = const MessageKind( | 19 static const RETURN_NOTHING = const MessageKind( |
| 20 'value of type #{1} expected'); | 20 'value of type #{1} expected'); |
| 21 static final MISSING_ARGUMENT = const MessageKind( | 21 static const MISSING_ARGUMENT = const MessageKind( |
| 22 'missing argument of type #{1}'); | 22 'missing argument of type #{1}'); |
| 23 static final ADDITIONAL_ARGUMENT = const MessageKind( | 23 static const ADDITIONAL_ARGUMENT = const MessageKind( |
| 24 'additional argument'); | 24 'additional argument'); |
| 25 static final METHOD_NOT_FOUND = const MessageKind( | 25 static const METHOD_NOT_FOUND = const MessageKind( |
| 26 'no method named #{2} in class #{1}'); | 26 'no method named #{2} in class #{1}'); |
| 27 static final MEMBER_NOT_STATIC = const MessageKind( | 27 static const MEMBER_NOT_STATIC = const MessageKind( |
| 28 '#{1}.#{2} is not static'); | 28 '#{1}.#{2} is not static'); |
| 29 static final NO_INSTANCE_AVAILABLE = const MessageKind( | 29 static const NO_INSTANCE_AVAILABLE = const MessageKind( |
| 30 '#{1} is only available in instance methods'); | 30 '#{1} is only available in instance methods'); |
| 31 | 31 |
| 32 static final UNREACHABLE_CODE = const MessageKind( | 32 static const UNREACHABLE_CODE = const MessageKind( |
| 33 'unreachable code'); | 33 'unreachable code'); |
| 34 static final MISSING_RETURN = const MessageKind( | 34 static const MISSING_RETURN = const MessageKind( |
| 35 'missing return'); | 35 'missing return'); |
| 36 static final MAYBE_MISSING_RETURN = const MessageKind( | 36 static const MAYBE_MISSING_RETURN = const MessageKind( |
| 37 'not all paths lead to a return or throw statement'); | 37 'not all paths lead to a return or throw statement'); |
| 38 | 38 |
| 39 static final CANNOT_RESOLVE = const MessageKind( | 39 static const CANNOT_RESOLVE = const MessageKind( |
| 40 'cannot resolve #{1}'); | 40 'cannot resolve #{1}'); |
| 41 static final CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( | 41 static const CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( |
| 42 'cannot resolve constructor #{1}'); | 42 'cannot resolve constructor #{1}'); |
| 43 static final CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind( | 43 static const CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind( |
| 44 'cannot resolve constructor #{1} for implicit super call'); | 44 'cannot resolve constructor #{1} for implicit super call'); |
| 45 static final CANNOT_RESOLVE_TYPE = const MessageKind( | 45 static const CANNOT_RESOLVE_TYPE = const MessageKind( |
| 46 'cannot resolve type #{1}'); | 46 'cannot resolve type #{1}'); |
| 47 static final DUPLICATE_DEFINITION = const MessageKind( | 47 static const DUPLICATE_DEFINITION = const MessageKind( |
| 48 'duplicate definition of #{1}'); | 48 'duplicate definition of #{1}'); |
| 49 static final NOT_A_TYPE = const MessageKind( | 49 static const NOT_A_TYPE = const MessageKind( |
| 50 '#{1} is not a type'); | 50 '#{1} is not a type'); |
| 51 static final NOT_A_PREFIX = const MessageKind( | 51 static const NOT_A_PREFIX = const MessageKind( |
| 52 '#{1} is not a prefix'); | 52 '#{1} is not a prefix'); |
| 53 static final NO_SUPER_IN_OBJECT = const MessageKind( | 53 static const NO_SUPER_IN_OBJECT = const MessageKind( |
| 54 "'Object' does not have a superclass"); | 54 "'Object' does not have a superclass"); |
| 55 static final CANNOT_FIND_CONSTRUCTOR = const MessageKind( | 55 static const CANNOT_FIND_CONSTRUCTOR = const MessageKind( |
| 56 'cannot find constructor #{1}'); | 56 'cannot find constructor #{1}'); |
| 57 static final CANNOT_FIND_CONSTRUCTOR2 = const MessageKind( | 57 static const CANNOT_FIND_CONSTRUCTOR2 = const MessageKind( |
| 58 'cannot find constructor #{1} in #{2}'); | 58 'cannot find constructor #{1} in #{2}'); |
| 59 static final CYCLIC_CLASS_HIERARCHY = const MessageKind( | 59 static const CYCLIC_CLASS_HIERARCHY = const MessageKind( |
| 60 '#{1} creates a cycle in the class hierarchy'); | 60 '#{1} creates a cycle in the class hierarchy'); |
| 61 static final INVALID_RECEIVER_IN_INITIALIZER = const MessageKind( | 61 static const INVALID_RECEIVER_IN_INITIALIZER = const MessageKind( |
| 62 'field initializer expected'); | 62 'field initializer expected'); |
| 63 static final NO_SUPER_IN_STATIC = const MessageKind( | 63 static const NO_SUPER_IN_STATIC = const MessageKind( |
| 64 "'super' is only available in instance methods"); | 64 "'super' is only available in instance methods"); |
| 65 static final DUPLICATE_INITIALIZER = const MessageKind( | 65 static const DUPLICATE_INITIALIZER = const MessageKind( |
| 66 'field #{1} is initialized more than once'); | 66 'field #{1} is initialized more than once'); |
| 67 static final ALREADY_INITIALIZED = const MessageKind( | 67 static const ALREADY_INITIALIZED = const MessageKind( |
| 68 '#{1} was already initialized here'); | 68 '#{1} was already initialized here'); |
| 69 static final INIT_STATIC_FIELD = const MessageKind( | 69 static const INIT_STATIC_FIELD = const MessageKind( |
| 70 'cannot initialize static field #{1}'); | 70 'cannot initialize static field #{1}'); |
| 71 static final NOT_A_FIELD = const MessageKind( | 71 static const NOT_A_FIELD = const MessageKind( |
| 72 '#{1} is not a field'); | 72 '#{1} is not a field'); |
| 73 static final CONSTRUCTOR_CALL_EXPECTED = const MessageKind( | 73 static const CONSTRUCTOR_CALL_EXPECTED = const MessageKind( |
| 74 "only call to 'this' or 'super' constructor allowed"); | 74 "only call to 'this' or 'super' constructor allowed"); |
| 75 static final INVALID_FOR_IN = const MessageKind( | 75 static const INVALID_FOR_IN = const MessageKind( |
| 76 'invalid for-in variable declaration.'); | 76 'invalid for-in variable declaration.'); |
| 77 static final INVALID_INITIALIZER = const MessageKind( | 77 static const INVALID_INITIALIZER = const MessageKind( |
| 78 'invalid initializer'); | 78 'invalid initializer'); |
| 79 static final FUNCTION_WITH_INITIALIZER = const MessageKind( | 79 static const FUNCTION_WITH_INITIALIZER = const MessageKind( |
| 80 'only constructors can have initializers'); | 80 'only constructors can have initializers'); |
| 81 static final REDIRECTING_CONSTRUCTOR_CYCLE = const MessageKind( | 81 static const REDIRECTING_CONSTRUCTOR_CYCLE = const MessageKind( |
| 82 'cyclic constructor redirection'); | 82 'cyclic constructor redirection'); |
| 83 static final REDIRECTING_CONSTRUCTOR_HAS_BODY = const MessageKind( | 83 static const REDIRECTING_CONSTRUCTOR_HAS_BODY = const MessageKind( |
| 84 'redirecting constructor cannot have a body'); | 84 'redirecting constructor cannot have a body'); |
| 85 static final REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER = const MessageKind( | 85 static const REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER = const MessageKind( |
| 86 'redirecting constructor cannot have other initializers'); | 86 'redirecting constructor cannot have other initializers'); |
| 87 static final SUPER_INITIALIZER_IN_OBJECT = const MessageKind( | 87 static const SUPER_INITIALIZER_IN_OBJECT = const MessageKind( |
| 88 "'Object' cannot have a super initializer"); | 88 "'Object' cannot have a super initializer"); |
| 89 static final DUPLICATE_SUPER_INITIALIZER = const MessageKind( | 89 static const DUPLICATE_SUPER_INITIALIZER = const MessageKind( |
| 90 'cannot have more than one super initializer'); | 90 'cannot have more than one super initializer'); |
| 91 static final NO_MATCHING_CONSTRUCTOR = const MessageKind( | 91 static const NO_MATCHING_CONSTRUCTOR = const MessageKind( |
| 92 "super call arguments and constructor parameters don't match"); | 92 "super call arguments and constructor parameters don't match"); |
| 93 static final NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind( | 93 static const NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT = const MessageKind( |
| 94 "implicit super call arguments and constructor parameters don't match"); | 94 "implicit super call arguments and constructor parameters don't match"); |
| 95 static final NO_CONSTRUCTOR = const MessageKind( | 95 static const NO_CONSTRUCTOR = const MessageKind( |
| 96 '#{1} is a #{2}, not a constructor'); | 96 '#{1} is a #{2}, not a constructor'); |
| 97 static final FIELD_PARAMETER_NOT_ALLOWED = const MessageKind( | 97 static const FIELD_PARAMETER_NOT_ALLOWED = const MessageKind( |
| 98 'a field parameter is only allowed in generative constructors'); | 98 'a field parameter is only allowed in generative constructors'); |
| 99 static final INVALID_PARAMETER = const MessageKind( | 99 static const INVALID_PARAMETER = const MessageKind( |
| 100 "cannot resolve parameter"); | 100 "cannot resolve parameter"); |
| 101 static final NOT_INSTANCE_FIELD = const MessageKind( | 101 static const NOT_INSTANCE_FIELD = const MessageKind( |
| 102 '#{1} is not an instance field'); | 102 '#{1} is not an instance field'); |
| 103 static final NO_CATCH_NOR_FINALLY = const MessageKind( | 103 static const NO_CATCH_NOR_FINALLY = const MessageKind( |
| 104 "expected 'catch' or 'finally'"); | 104 "expected 'catch' or 'finally'"); |
| 105 static final EMPTY_CATCH_DECLARATION = const MessageKind( | 105 static const EMPTY_CATCH_DECLARATION = const MessageKind( |
| 106 'expected a variable in catch declaration'); | 106 'expected a variable in catch declaration'); |
| 107 static final EXTRA_CATCH_DECLARATION = const MessageKind( | 107 static const EXTRA_CATCH_DECLARATION = const MessageKind( |
| 108 'extra variable in catch declaration'); | 108 'extra variable in catch declaration'); |
| 109 static final UNBOUND_LABEL = const MessageKind( | 109 static const UNBOUND_LABEL = const MessageKind( |
| 110 'cannot resolve label #{1}'); | 110 'cannot resolve label #{1}'); |
| 111 static final NO_BREAK_TARGET = const MessageKind( | 111 static const NO_BREAK_TARGET = const MessageKind( |
| 112 'break statement not inside switch or loop'); | 112 'break statement not inside switch or loop'); |
| 113 static final NO_CONTINUE_TARGET = const MessageKind( | 113 static const NO_CONTINUE_TARGET = const MessageKind( |
| 114 'continue statement not inside loop'); | 114 'continue statement not inside loop'); |
| 115 static final EXISTING_LABEL = const MessageKind( | 115 static const EXISTING_LABEL = const MessageKind( |
| 116 'original declaration of duplicate label #{1}'); | 116 'original declaration of duplicate label #{1}'); |
| 117 static final DUPLICATE_LABEL = const MessageKind( | 117 static const DUPLICATE_LABEL = const MessageKind( |
| 118 'duplicate declaration of label #{1}'); | 118 'duplicate declaration of label #{1}'); |
| 119 static final UNUSED_LABEL = const MessageKind( | 119 static const UNUSED_LABEL = const MessageKind( |
| 120 'unused label #{1}'); | 120 'unused label #{1}'); |
| 121 static final INVALID_CONTINUE = const MessageKind( | 121 static const INVALID_CONTINUE = const MessageKind( |
| 122 'target of continue is not a loop or switch case'); | 122 'target of continue is not a loop or switch case'); |
| 123 static final TYPE_VARIABLE_AS_CONSTRUCTOR = const MessageKind( | 123 static const TYPE_VARIABLE_AS_CONSTRUCTOR = const MessageKind( |
| 124 'cannot use type variable as constructor'); | 124 'cannot use type variable as constructor'); |
| 125 static final DUPLICATE_TYPE_VARIABLE_NAME = const MessageKind( | 125 static const DUPLICATE_TYPE_VARIABLE_NAME = const MessageKind( |
| 126 'type variable #{1} already declared'); | 126 'type variable #{1} already declared'); |
| 127 static final INVALID_BREAK = const MessageKind( | 127 static const INVALID_BREAK = const MessageKind( |
| 128 'target of break is not a statement'); | 128 'target of break is not a statement'); |
| 129 static final INVALID_USE_OF_SUPER = const MessageKind( | 129 static const INVALID_USE_OF_SUPER = const MessageKind( |
| 130 'super not allowed here'); | 130 'super not allowed here'); |
| 131 static final INVALID_CASE_DEFAULT = const MessageKind( | 131 static const INVALID_CASE_DEFAULT = const MessageKind( |
| 132 'default only allowed on last case of a switch'); | 132 'default only allowed on last case of a switch'); |
| 133 static final INVALID_CASE_EXPRESSION = const MessageKind( | 133 static const INVALID_CASE_EXPRESSION = const MessageKind( |
| 134 'case expression is not a compile-time constant int or string.'); | 134 'case expression is not a compile-time constant int or string.'); |
| 135 static final INVALID_CASE_EXPRESSION_TYPE = const MessageKind( | 135 static const INVALID_CASE_EXPRESSION_TYPE = const MessageKind( |
| 136 "case expressions don't all have the same type " | 136 "case expressions don't all have the same type " |
| 137 "(must be all int or String)."); | 137 "(must be all int or String)."); |
| 138 static final INVALID_ARGUMENT_AFTER_NAMED = const MessageKind( | 138 static const INVALID_ARGUMENT_AFTER_NAMED = const MessageKind( |
| 139 'non-named argument after named argument'); | 139 'non-named argument after named argument'); |
| 140 | 140 |
| 141 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind( | 141 static const NOT_A_COMPILE_TIME_CONSTANT = const MessageKind( |
| 142 'not a compile-time constant'); | 142 'not a compile-time constant'); |
| 143 static final CYCLIC_COMPILE_TIME_CONSTANTS = const MessageKind( | 143 static const CYCLIC_COMPILE_TIME_CONSTANTS = const MessageKind( |
| 144 'cycle in the compile-time constant computation'); | 144 'cycle in the compile-time constant computation'); |
| 145 | 145 |
| 146 static final KEY_NOT_A_STRING_LITERAL = const MessageKind( | 146 static const KEY_NOT_A_STRING_LITERAL = const MessageKind( |
| 147 'map-literal key not a string literal'); | 147 'map-literal key not a string literal'); |
| 148 | 148 |
| 149 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind( | 149 static const NO_SUCH_LIBRARY_MEMBER = const MessageKind( |
| 150 '#{1} has no member named #{2}'); | 150 '#{1} has no member named #{2}'); |
| 151 | 151 |
| 152 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind( | 152 static const CANNOT_INSTANTIATE_INTERFACE = const MessageKind( |
| 153 "cannot instantiate interface '#{1}'"); | 153 "cannot instantiate interface '#{1}'"); |
| 154 | 154 |
| 155 static final CANNOT_INSTANTIATE_TYPEDEF = const MessageKind( | 155 static const CANNOT_INSTANTIATE_TYPEDEF = const MessageKind( |
| 156 "cannot instantiate typedef '#{1}'"); | 156 "cannot instantiate typedef '#{1}'"); |
| 157 | 157 |
| 158 static final NO_DEFAULT_CLASS = const MessageKind( | 158 static const NO_DEFAULT_CLASS = const MessageKind( |
| 159 "no default class on enclosing interface '#{1}'"); | 159 "no default class on enclosing interface '#{1}'"); |
| 160 | 160 |
| 161 static final CYCLIC_TYPE_VARIABLE = const MessageKind( | 161 static const CYCLIC_TYPE_VARIABLE = const MessageKind( |
| 162 "cyclic reference to type variable #{1}"); | 162 "cyclic reference to type variable #{1}"); |
| 163 static final TYPE_NAME_EXPECTED = const MessageKind( | 163 static const TYPE_NAME_EXPECTED = const MessageKind( |
| 164 "class or interface name expected"); | 164 "class or interface name expected"); |
| 165 | 165 |
| 166 static final CANNOT_EXTEND = const MessageKind( | 166 static const CANNOT_EXTEND = const MessageKind( |
| 167 "#{1} cannot be extended"); | 167 "#{1} cannot be extended"); |
| 168 | 168 |
| 169 static final CANNOT_IMPLEMENT = const MessageKind( | 169 static const CANNOT_IMPLEMENT = const MessageKind( |
| 170 "#{1} cannot be implemented"); | 170 "#{1} cannot be implemented"); |
| 171 | 171 |
| 172 static final ILLEGAL_SUPER_SEND = const MessageKind( | 172 static const ILLEGAL_SUPER_SEND = const MessageKind( |
| 173 "#{1} cannot be called on super"); | 173 "#{1} cannot be called on super"); |
| 174 | 174 |
| 175 static final ADDITIONAL_TYPE_ARGUMENT = const MessageKind( | 175 static const ADDITIONAL_TYPE_ARGUMENT = const MessageKind( |
| 176 "additional type argument"); | 176 "additional type argument"); |
| 177 | 177 |
| 178 static final MISSING_TYPE_ARGUMENT = const MessageKind( | 178 static const MISSING_TYPE_ARGUMENT = const MessageKind( |
| 179 "missing type argument"); | 179 "missing type argument"); |
| 180 | 180 |
| 181 static final MISSING_ARGUMENTS_TO_ASSERT = const MessageKind( | 181 static const MISSING_ARGUMENTS_TO_ASSERT = const MessageKind( |
| 182 "missing arguments to assert"); | 182 "missing arguments to assert"); |
| 183 | 183 |
| 184 static final GETTER_MISMATCH = const MessageKind( | 184 static const GETTER_MISMATCH = const MessageKind( |
| 185 "Error: setter disagrees on: #{1}."); | 185 "Error: setter disagrees on: #{1}."); |
| 186 | 186 |
| 187 static final SETTER_MISMATCH = const MessageKind( | 187 static const SETTER_MISMATCH = const MessageKind( |
| 188 "Error: getter disagrees on: #{1}."); | 188 "Error: getter disagrees on: #{1}."); |
| 189 | 189 |
| 190 static final NO_STATIC_OVERRIDE = const MessageKind( | 190 static const NO_STATIC_OVERRIDE = const MessageKind( |
| 191 "Error: static member cannot override instance member '#{1}' of '#{2}'."); | 191 "Error: static member cannot override instance member '#{1}' of '#{2}'."); |
| 192 | 192 |
| 193 static final NO_STATIC_OVERRIDE_CONT = const MessageKind( | 193 static const NO_STATIC_OVERRIDE_CONT = const MessageKind( |
| 194 "Info: this is the instance member that cannot be overridden " | 194 "Info: this is the instance member that cannot be overridden " |
| 195 "by a static member."); | 195 "by a static member."); |
| 196 | 196 |
| 197 static final CANNOT_OVERRIDE_FIELD_WITH_METHOD = const MessageKind( | 197 static const CANNOT_OVERRIDE_FIELD_WITH_METHOD = const MessageKind( |
| 198 "Error: method cannot override field '#{1}' of '#{2}'."); | 198 "Error: method cannot override field '#{1}' of '#{2}'."); |
| 199 | 199 |
| 200 static final CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT = const MessageKind( | 200 static const CANNOT_OVERRIDE_FIELD_WITH_METHOD_CONT = const MessageKind( |
| 201 "Info: this is the field that cannot be overridden by a method."); | 201 "Info: this is the field that cannot be overridden by a method."); |
| 202 | 202 |
| 203 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD = const MessageKind( | 203 static const CANNOT_OVERRIDE_METHOD_WITH_FIELD = const MessageKind( |
| 204 "Error: field cannot override method '#{1}' of '#{2}'."); | 204 "Error: field cannot override method '#{1}' of '#{2}'."); |
| 205 | 205 |
| 206 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind( | 206 static const CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind( |
| 207 "Info: this is the method that cannot be overridden by a field."); | 207 "Info: this is the method that cannot be overridden by a field."); |
| 208 | 208 |
| 209 static final BAD_ARITY_OVERRIDE = const MessageKind( | 209 static const BAD_ARITY_OVERRIDE = const MessageKind( |
| 210 "Error: cannot override method '#{1}' in '#{2}'; " | 210 "Error: cannot override method '#{1}' in '#{2}'; " |
| 211 "the parameters do not match."); | 211 "the parameters do not match."); |
| 212 | 212 |
| 213 static final BAD_ARITY_OVERRIDE_CONT = const MessageKind( | 213 static const BAD_ARITY_OVERRIDE_CONT = const MessageKind( |
| 214 "Info: this is the method whose parameters do not match."); | 214 "Info: this is the method whose parameters do not match."); |
| 215 | 215 |
| 216 static final MISSING_FORMALS = const MessageKind( | 216 static const MISSING_FORMALS = const MessageKind( |
| 217 "Error: Formal parameters are missing."); | 217 "Error: Formal parameters are missing."); |
| 218 | 218 |
| 219 // TODO(ahe): Change the message below when it becomes an error. | 219 // TODO(ahe): Change the message below when it becomes an error. |
| 220 static final EXTRA_FORMALS = const MessageKind( | 220 static const EXTRA_FORMALS = const MessageKind( |
| 221 "Warning: Formal parameters will not be allowed here in M1."); | 221 "Warning: Formal parameters will not be allowed here in M1."); |
| 222 | 222 |
| 223 static final CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( | 223 static const CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( |
| 224 "Error: cannot have return type for constructor."); | 224 "Error: cannot have return type for constructor."); |
| 225 | 225 |
| 226 static final ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( | 226 static const ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( |
| 227 "Error: cannot have final modifier on method."); | 227 "Error: cannot have final modifier on method."); |
| 228 | 228 |
| 229 static final ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( | 229 static const ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( |
| 230 "Error: illegal constructor modifiers: #{1}."); | 230 "Error: illegal constructor modifiers: #{1}."); |
| 231 | 231 |
| 232 static final COMPILER_CRASHED = const MessageKind( | 232 static const COMPILER_CRASHED = const MessageKind( |
| 233 "Error: The compiler crashed when compiling this element."); | 233 "Error: The compiler crashed when compiling this element."); |
| 234 | 234 |
| 235 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' | 235 static const PLEASE_REPORT_THE_CRASH = const MessageKind(''' |
| 236 The compiler is broken. | 236 The compiler is broken. |
| 237 | 237 |
| 238 When compiling the above element, the compiler crashed. It is not | 238 When compiling the above element, the compiler crashed. It is not |
| 239 possible to tell if this is caused by a problem in your program or | 239 possible to tell if this is caused by a problem in your program or |
| 240 not. Regardless, the compiler should not crash. | 240 not. Regardless, the compiler should not crash. |
| 241 | 241 |
| 242 The Dart team would greatly appreciate if you would take a moment to | 242 The Dart team would greatly appreciate if you would take a moment to |
| 243 report this problem at http://dartbug.com/new. | 243 report this problem at http://dartbug.com/new. |
| 244 | 244 |
| 245 Please include the following information: | 245 Please include the following information: |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 319 |
| 320 class CompileTimeConstantError extends Diagnostic { | 320 class CompileTimeConstantError extends Diagnostic { |
| 321 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 321 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
| 322 : super(kind, arguments); | 322 : super(kind, arguments); |
| 323 } | 323 } |
| 324 | 324 |
| 325 class CompilationError extends Diagnostic { | 325 class CompilationError extends Diagnostic { |
| 326 CompilationError(MessageKind kind, List<Type> arguments) | 326 CompilationError(MessageKind kind, List<Type> arguments) |
| 327 : super(kind, arguments); | 327 : super(kind, arguments); |
| 328 } | 328 } |
| OLD | NEW |