| 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 = "Computer says no!"; | 7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; |
| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 static const MessageKind INVALID_UNNAMED_CONSTRUCTOR_NAME = const MessageKind( | 175 static const MessageKind INVALID_UNNAMED_CONSTRUCTOR_NAME = const MessageKind( |
| 176 "Unnamed constructor name must be '#{name}'."); | 176 "Unnamed constructor name must be '#{name}'."); |
| 177 | 177 |
| 178 static const MessageKind INVALID_CONSTRUCTOR_NAME = const MessageKind( | 178 static const MessageKind INVALID_CONSTRUCTOR_NAME = const MessageKind( |
| 179 "Constructor name must start with '#{name}'."); | 179 "Constructor name must start with '#{name}'."); |
| 180 | 180 |
| 181 static const MessageKind CANNOT_RESOLVE_TYPE = const MessageKind( | 181 static const MessageKind CANNOT_RESOLVE_TYPE = const MessageKind( |
| 182 "Cannot resolve type '#{typeName}'."); | 182 "Cannot resolve type '#{typeName}'."); |
| 183 | 183 |
| 184 static const MessageKind DUPLICATE_DEFINITION = const MessageKind( | 184 static const MessageKind DUPLICATE_DEFINITION = const MessageKind( |
| 185 "Duplicate definition of '#{name}'."); | 185 "Duplicate definition of '#{name}'.", |
| 186 howToFix: "Try to rename or remove this definition.", |
| 187 examples: const [""" |
| 188 class C { |
| 189 void f() {} |
| 190 int get f => 1; |
| 191 } |
| 192 |
| 193 main() { |
| 194 new C(); |
| 195 } |
| 196 |
| 197 """]); |
| 186 | 198 |
| 187 static const MessageKind EXISTING_DEFINITION = const MessageKind( | 199 static const MessageKind EXISTING_DEFINITION = const MessageKind( |
| 188 "Existing definition of '#{name}'."); | 200 "Existing definition of '#{name}'."); |
| 189 | 201 |
| 190 static const MessageKind DUPLICATE_IMPORT = const MessageKind( | 202 static const MessageKind DUPLICATE_IMPORT = const MessageKind( |
| 191 "Duplicate import of '#{name}'."); | 203 "Duplicate import of '#{name}'."); |
| 192 | 204 |
| 193 static const MessageKind HIDDEN_IMPORT = const MessageKind( | 205 static const MessageKind HIDDEN_IMPORT = const MessageKind( |
| 194 "'#{name}' from library '#{hiddenUri}' is hidden by '#{name}' " | 206 "'#{name}' from library '#{hiddenUri}' is hidden by '#{name}' " |
| 195 "from library '#{hidingUri}'.", | 207 "from library '#{hidingUri}'.", |
| (...skipping 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 static String convertToString(value) { | 2450 static String convertToString(value) { |
| 2439 if (value is ErrorToken) { | 2451 if (value is ErrorToken) { |
| 2440 // Shouldn't happen. | 2452 // Shouldn't happen. |
| 2441 return value.assertionMessage; | 2453 return value.assertionMessage; |
| 2442 } else if (value is Token) { | 2454 } else if (value is Token) { |
| 2443 value = value.value; | 2455 value = value.value; |
| 2444 } | 2456 } |
| 2445 return '$value'; | 2457 return '$value'; |
| 2446 } | 2458 } |
| 2447 } | 2459 } |
| OLD | NEW |