You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No "export" specified in "library3.dart" during importing "library2.dart", so its elements are not visible in "Library2NegativeTest.dart", so no compilation error should happen.
scheglov@scheglov-macbookpro:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/library2_negative_test.dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// This test should fail to load because we are importing two libraries
// which define the same top level name.
library("Library2NegativeTest.dart");
import("library3.dart"); // imports library2.dart and defines foo/foo1.
import("library4.dart"); // imports library2.dart and defines foo/foo1.
main() {
Expect.equals(0, foo1);
}
scheglov@scheglov-macbookpro:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/library3.dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
library("library3.dart");
import("library2.dart"); // defines "foo" and "foo1".
scheglov@scheglov-macbookpro:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/library4.dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
library("library4.dart");
import("library2.dart"); // defines "foo" and "foo1".
var foo;
var foo1 = 0;
scheglov@scheglov-macbookpro:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/library2.dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
library("library2.dart");
var foo;
var foo1 = 0;
The text was updated successfully, but these errors were encountered:
"12.2 Imports"
libraryImport:
#import'
(' stringLiteral(
, 'export:' (true j false))?
(, ' combinator)\*
(, '
prex:' stringLiteral)?)
;';
No "export" specified in "library3.dart" during importing "library2.dart", so its elements are not visible in "Library2NegativeTest.dart", so no compilation error should happen.
scheglov@scheglov-macbookpro:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/library2_negative_test.dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// This test should fail to load because we are importing two libraries
// which define the same top level name.
library("Library2NegativeTest.dart");
import("library3.dart"); // imports library2.dart and defines foo/foo1.
import("library4.dart"); // imports library2.dart and defines foo/foo1.
main() {
Expect.equals(0, foo1);
}
scheglov@scheglov-macbookpro:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/library3.dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
library("library3.dart");
import("library2.dart"); // defines "foo" and "foo1".
scheglov@scheglov-macbookpro:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/library4.dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
library("library4.dart");
import("library2.dart"); // defines "foo" and "foo1".
var foo;
var foo1 = 0;
scheglov@scheglov-macbookpro:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/library2.dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
library("library2.dart");
var foo;
var foo1 = 0;
The text was updated successfully, but these errors were encountered: