| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 const DONT_KNOW_HOW_TO_FIX = ""; | 7 const DONT_KNOW_HOW_TO_FIX = ""; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * The messages in this file should meet the following guide lines: | 10 * The messages in this file should meet the following guide lines: |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 'Warning: Not all paths lead to a return or throw statement.'); | 162 'Warning: Not all paths lead to a return or throw statement.'); |
| 163 | 163 |
| 164 static const DualKind CANNOT_RESOLVE = const DualKind( | 164 static const DualKind CANNOT_RESOLVE = const DualKind( |
| 165 error: const MessageKind('Error: Cannot resolve "#{name}".'), | 165 error: const MessageKind('Error: Cannot resolve "#{name}".'), |
| 166 warning: const MessageKind('Warning: Cannot resolve "#{name}".')); | 166 warning: const MessageKind('Warning: Cannot resolve "#{name}".')); |
| 167 | 167 |
| 168 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( | 168 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( |
| 169 'Error: Cannot resolve constructor "#{constructorName}".'); | 169 'Error: Cannot resolve constructor "#{constructorName}".'); |
| 170 | 170 |
| 171 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = | 171 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = |
| 172 const MessageKind( | 172 const MessageKind('Error: cannot resolve constructor "#{constructorName}"' |
| 173 'Error: cannot resolve constructor "#{constructorName}" for implicit' | 173 ' for implicit super call.', |
| 174 'super call.'); | 174 howToFix: 'Try explicitly invoking a constructor of the super class', |
| 175 examples: const [""" |
| 176 class A { |
| 177 A.foo() {} |
| 178 } |
| 179 class B etxends A {} |
| 180 main() => new B(); |
| 181 """]); |
| 175 | 182 |
| 176 static const MessageKind INVALID_UNNAMED_CONSTRUCTOR_NAME = const MessageKind( | 183 static const MessageKind INVALID_UNNAMED_CONSTRUCTOR_NAME = const MessageKind( |
| 177 'Error: Unnamed constructor name must be "#{name}".'); | 184 'Error: Unnamed constructor name must be "#{name}".'); |
| 178 | 185 |
| 179 static const MessageKind INVALID_CONSTRUCTOR_NAME = const MessageKind( | 186 static const MessageKind INVALID_CONSTRUCTOR_NAME = const MessageKind( |
| 180 'Error: Constructor name must start with "#{name}".'); | 187 'Error: Constructor name must start with "#{name}".'); |
| 181 | 188 |
| 182 static const DualKind CANNOT_RESOLVE_TYPE = const DualKind( | 189 static const DualKind CANNOT_RESOLVE_TYPE = const DualKind( |
| 183 error: const MessageKind('Error: Cannot resolve type "#{typeName}".'), | 190 error: const MessageKind('Error: Cannot resolve type "#{typeName}".'), |
| 184 warning: const MessageKind( | 191 warning: const MessageKind( |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 266 |
| 260 static const DualKind CANNOT_FIND_CONSTRUCTOR = const DualKind( | 267 static const DualKind CANNOT_FIND_CONSTRUCTOR = const DualKind( |
| 261 error: const MessageKind( | 268 error: const MessageKind( |
| 262 'Error: Cannot find constructor "#{constructorName}".'), | 269 'Error: Cannot find constructor "#{constructorName}".'), |
| 263 warning: const MessageKind( | 270 warning: const MessageKind( |
| 264 'Warning: Cannot find constructor "#{constructorName}".')); | 271 'Warning: Cannot find constructor "#{constructorName}".')); |
| 265 | 272 |
| 266 static const MessageKind CYCLIC_CLASS_HIERARCHY = const MessageKind( | 273 static const MessageKind CYCLIC_CLASS_HIERARCHY = const MessageKind( |
| 267 'Error: "#{className}" creates a cycle in the class hierarchy.'); | 274 'Error: "#{className}" creates a cycle in the class hierarchy.'); |
| 268 | 275 |
| 276 static const MessageKind CYCLIC_REDIRECTING_FACTORY = const MessageKind( |
| 277 'Error: Redirecting factory leads to a cyclic redirection.'); |
| 278 |
| 269 static const MessageKind INVALID_RECEIVER_IN_INITIALIZER = const MessageKind( | 279 static const MessageKind INVALID_RECEIVER_IN_INITIALIZER = const MessageKind( |
| 270 'Error: Field initializer expected.'); | 280 'Error: Field initializer expected.'); |
| 271 | 281 |
| 272 static const MessageKind NO_SUPER_IN_STATIC = const MessageKind( | 282 static const MessageKind NO_SUPER_IN_STATIC = const MessageKind( |
| 273 'Error: "super" is only available in instance methods.'); | 283 'Error: "super" is only available in instance methods.'); |
| 274 | 284 |
| 275 static const MessageKind DUPLICATE_INITIALIZER = const MessageKind( | 285 static const MessageKind DUPLICATE_INITIALIZER = const MessageKind( |
| 276 'Error: Field "#{fieldName}" is initialized more than once.'); | 286 'Error: Field "#{fieldName}" is initialized more than once.'); |
| 277 | 287 |
| 278 static const MessageKind ALREADY_INITIALIZED = const MessageKind( | 288 static const MessageKind ALREADY_INITIALIZED = const MessageKind( |
| (...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 | 1248 |
| 1239 class CompileTimeConstantError extends Diagnostic { | 1249 class CompileTimeConstantError extends Diagnostic { |
| 1240 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) | 1250 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) |
| 1241 : super(kind, arguments, terse); | 1251 : super(kind, arguments, terse); |
| 1242 } | 1252 } |
| 1243 | 1253 |
| 1244 class CompilationError extends Diagnostic { | 1254 class CompilationError extends Diagnostic { |
| 1245 CompilationError(MessageKind kind, Map arguments, bool terse) | 1255 CompilationError(MessageKind kind, Map arguments, bool terse) |
| 1246 : super(kind, arguments, terse); | 1256 : super(kind, arguments, terse); |
| 1247 } | 1257 } |
| OLD | NEW |