Skip to content

language/library2_negative_test is invalid #3649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
scheglov opened this issue Jun 14, 2012 · 2 comments
Closed

language/library2_negative_test is invalid #3649

scheglov opened this issue Jun 14, 2012 · 2 comments
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).

Comments

@scheglov
Copy link
Contributor

"12.2 Imports"
libraryImport:
#import'(' stringLiteral (, ' export:' (true j false))?(, ' combinator)\*(, 'pre x:' 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;

@whesse
Copy link
Contributor

whesse commented Jun 15, 2012

Moved issues with specific language tests to the area "Language". These tests should be fixed by the language deciders and implementers.


Removed Area-Test label.
Added Area-Language label.

@srawlins
Copy link
Member

srawlins commented Aug 9, 2014

There is no longer a library2_negative_test.dart. Can this be closed?

@scheglov scheglov added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Aug 9, 2014
@kevmoo kevmoo removed the triaged label Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Projects
None yet
Development

No branches or pull requests

4 participants