| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // This test should fail to load because library1 defines a top-level | 5 // This test should fail to load because library1 defines a top-level |
| 6 // variable named 'foo' which conflicts with the prefix 'foo' used to import | 6 // variable named 'foo' which conflicts with the prefix 'foo' used to import |
| 7 // library3. This is an error even if 'foo' is never referred to. | 7 // library3. This is an error even if 'foo' is never referred to. |
| 8 | 8 |
| 9 #library("Library4NegativeTest.dart"); | 9 #library("Library4NegativeTest.dart"); |
| 10 #import("library1.dart"); // Defines a top-level variable 'foo' | 10 #import("library1.dart"); // Defines a top-level variable 'foo' |
| 11 #import("library3.dart", prefix:"foo"); // Creates prefix 'foo' | 11 #import("library3.dart", prefix:"foo"); // Creates prefix 'foo' |
| 12 | 12 |
| 13 main() { | 13 main() { |
| 14 } | 14 } |
| OLD | NEW |