Navigation Menu

Skip to content
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

Invalid export test #11589

Open
scheglov opened this issue Jun 28, 2013 · 5 comments
Open

Invalid export test #11589

scheglov opened this issue Jun 28, 2013 · 5 comments
Labels
area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@scheglov
Copy link
Contributor

language/export_cyclic_test

library export_cyclic_helper2 exports D from 2 export directives.

14.2 Exports
It is a compile-time error if a name N is re-exported by a library L and N
is introduced into the export namespace of L by more than one export.

scheglov@scheglov-macbookpro2:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/export_cyclic_test.dart
// Copyright (c) 2012, 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.

// Test cyclic export and re-export.

/**
 * export_cyclic_test re-exports export_cyclic_helper1 which declares B
 * export_cyclic_helper1 re-exports export_cyclic_helper2 which declares C
 * export_cyclic_helper2 re-exports export_cyclic_test which declares A
 * export_cyclic_helper2 re-exports export_cyclic_helper3 which declares D
 */

library export_cyclic_test;

import 'export_cyclic_helper1.dart';
export 'export_cyclic_helper1.dart';

class A {}

void main() {
  print(new A());
  print(new B());
  print(new C());
  print(new D());
}

scheglov@scheglov-macbookpro2:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/export_cyclic_helper1.dart
// Copyright (c) 2012, 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 export_cyclic_helper1;

import 'export_cyclic_helper2.dart';
export 'export_cyclic_helper2.dart';

class B {
  A a;
  B b;
  C c;
  D d;
}
scheglov@scheglov-macbookpro2:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/export_cyclic_helper2.dart
// Copyright (c) 2012, 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 export_cyclic_helper2;

import 'export_cyclic_test.dart';
import 'export_cyclic_helper3.dart';
export 'export_cyclic_test.dart';
export 'export_cyclic_helper3.dart';

class C {
  A a;
  B b;
  C c;
  D d;
}
scheglov@scheglov-macbookpro2:~/Source/Dart/dart$ cat /Users/scheglov/Source/Dart/dart/tests/language/export_cyclic_helper3.dart
// Copyright (c) 2012, 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 export_cyclic_helper3;

class D {}

@ricowind
Copy link
Contributor

cc @peter-ahe-google.
cc @kasperl.

@larsbak
Copy link

larsbak commented Aug 28, 2013

Removed this from the M6 milestone.
Added this to the M7 milestone.

@kasperl
Copy link

kasperl commented Jun 4, 2014

Removed this from the M7 milestone.
Added this to the 1.6 milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@scheglov scheglov added Type-Defect area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). labels Aug 4, 2014
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

5 participants