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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 "Error: Duplicate definition of '#{name}'."); | 197 "Error: Duplicate definition of '#{name}'."); |
198 | 198 |
199 static const MessageKind EXISTING_DEFINITION = const MessageKind( | 199 static const MessageKind EXISTING_DEFINITION = const MessageKind( |
200 "Info: Existing definition of '#{name}'."); | 200 "Info: Existing definition of '#{name}'."); |
201 | 201 |
202 static const DualKind DUPLICATE_IMPORT = const DualKind( | 202 static const DualKind DUPLICATE_IMPORT = const DualKind( |
203 error: const MessageKind("Error: Duplicate import of '#{name}'."), | 203 error: const MessageKind("Error: Duplicate import of '#{name}'."), |
204 warning: const MessageKind("Warning: Duplicate import of '#{name}'.")); | 204 warning: const MessageKind("Warning: Duplicate import of '#{name}'.")); |
205 | 205 |
206 static const MessageKind HIDDEN_IMPORT = const MessageKind( | 206 static const MessageKind HIDDEN_IMPORT = const MessageKind( |
207 "Warning: '#{name}' from library '#{hiddenUri}' by '#{name}' " | 207 "Warning: '#{name}' from library '#{hiddenUri}' is hidden by '#{name}' " |
208 "from library '#{hidingUri}'.", | 208 "from library '#{hidingUri}'.", |
209 howToFix: "Try adding 'hide #{name}' to the import of '#{hiddenUri}'.", | 209 howToFix: "Try adding 'hide #{name}' to the import of '#{hiddenUri}'.", |
210 examples: const [ | 210 examples: const [ |
211 const { | 211 const { |
212 'main.dart': | 212 'main.dart': |
213 """ | 213 """ |
214 import 'dart:async'; // This imports a class Future. | 214 import 'dart:async'; // This imports a class Future. |
215 import 'future.dart'; | 215 import 'future.dart'; |
216 | 216 |
217 void main() {}""", | 217 void main() {}""", |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 library future; | 249 library future; |
250 | 250 |
251 class Future {}""", | 251 class Future {}""", |
252 | 252 |
253 'export.dart': | 253 'export.dart': |
254 """ | 254 """ |
255 library export; | 255 library export; |
256 | 256 |
257 export 'future.dart';"""}]); | 257 export 'future.dart';"""}]); |
258 | 258 |
| 259 |
| 260 static const MessageKind HIDDEN_IMPLICIT_IMPORT = const MessageKind( |
| 261 "Warning: '#{name}' from library '#{hiddenUri}' is hidden by '#{name}' " |
| 262 "from library '#{hidingUri}'.", |
| 263 howToFix: "Try adding an explicit " |
| 264 "'import \"#{hiddenUri}\" hide #{name}'.", |
| 265 examples: const [ |
| 266 const { |
| 267 'main.dart': |
| 268 """ |
| 269 // This hides the implicit import of class Type from dart:core. |
| 270 import 'type.dart'; |
| 271 |
| 272 void main() {}""", |
| 273 |
| 274 'type.dart': |
| 275 """ |
| 276 library type; |
| 277 |
| 278 class Type {}"""}]); |
| 279 |
259 static const MessageKind DUPLICATE_EXPORT = const MessageKind( | 280 static const MessageKind DUPLICATE_EXPORT = const MessageKind( |
260 "Error: Duplicate export of '#{name}'."); | 281 "Error: Duplicate export of '#{name}'."); |
261 | 282 |
262 static const DualKind NOT_A_TYPE = const DualKind( | 283 static const DualKind NOT_A_TYPE = const DualKind( |
263 error: const MessageKind("Error: '#{node}' is not a type."), | 284 error: const MessageKind("Error: '#{node}' is not a type."), |
264 warning: const MessageKind("Warning: '#{node}' is not a type.")); | 285 warning: const MessageKind("Warning: '#{node}' is not a type.")); |
265 | 286 |
266 static const MessageKind NOT_A_PREFIX = const MessageKind( | 287 static const MessageKind NOT_A_PREFIX = const MessageKind( |
267 "Error: '#{node}' is not a prefix."); | 288 "Error: '#{node}' is not a prefix."); |
268 | 289 |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 | 1334 |
1314 class CompileTimeConstantError extends Diagnostic { | 1335 class CompileTimeConstantError extends Diagnostic { |
1315 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) | 1336 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) |
1316 : super(kind, arguments, terse); | 1337 : super(kind, arguments, terse); |
1317 } | 1338 } |
1318 | 1339 |
1319 class CompilationError extends Diagnostic { | 1340 class CompilationError extends Diagnostic { |
1320 CompilationError(MessageKind kind, Map arguments, bool terse) | 1341 CompilationError(MessageKind kind, Map arguments, bool terse) |
1321 : super(kind, arguments, terse); | 1342 : super(kind, arguments, terse); |
1322 } | 1343 } |
OLD | NEW |