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

dartc doesn't namespace private globals in libraries #336

Closed
DartBot opened this issue Nov 4, 2011 · 4 comments
Closed

dartc doesn't namespace private globals in libraries #336

DartBot opened this issue Nov 4, 2011 · 4 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-invalid Closed as we don't believe the reported issue is generally actionable
Milestone

Comments

@DartBot
Copy link

DartBot commented Nov 4, 2011

This issue was originally filed by [email protected]


Consider these two libraries:

-- a.dart--

library("a");

final _private = 42;

afn ()=>_private;

-- b.dart--

library("b");

final _private = 22;

bfn () =>_private;

and a consumer:

--- import_dartc.dart ---

import("a.dart");

import("b.dart");

main() {
  print(afn());
  print(bfn());
}


With dart_bin this runs ok:
krukow:~/scratchpad$ dart_bin import_dartc.dart
42
22

With dartc we get a conflict:
krukow:~/scratchpad$ dartc import_dartc.dart
a.dart/a.dart:2: duplicate definition of _private
     1: #library("a");
     2: final _private = 42;

b.dart/b.dart:2: duplicate definition of _private
     1: #library("b");
     2: final _private = 22;

@DartBot
Copy link
Author

DartBot commented Nov 4, 2011

This comment was originally written by [email protected]


Added Area-Compiler, Triaged labels.

@kasperl
Copy link

kasperl commented Apr 17, 2012

Removed Area-Compiler label.
Added Area-Analyzer label.

@danrubel
Copy link

danrubel commented Jun 4, 2012

Added this to the M1 milestone.

@bwilkerson
Copy link
Member

Dartc no longer produces JS and it is correctly not reporting any warnings or errors for this case.


Set owner to @bwilkerson.
Added Invalid label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-invalid Closed as we don't believe the reported issue is generally actionable
Projects
None yet
Development

No branches or pull requests

4 participants