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

dart2dart: does not preserve static field symbol names #11827

Closed
pavelgj opened this issue Jul 15, 2013 · 1 comment
Closed

dart2dart: does not preserve static field symbol names #11827

pavelgj opened this issue Jul 15, 2013 · 1 comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue

Comments

@pavelgj
Copy link

pavelgj commented Jul 15, 2013

import 'dart:mirrors';
import 'lib.dart';
import 'lib2.dart' as lib2;

void main() {
  print(reflectClass(Foo).members[const Symbol('bar')]);
  print(reflectClass(lib2.Foo).members[const Symbol('bar')]);
}

lib.dart:


library lib;

class Foo {
  static String bar = '...';
}

lib2.dart:


library lib2;

class Foo {
  static String bar = '...';
}

Running:
dart2js -o test.dart.dart test.dart --output-type=dart --analyze-all -c

Produces (prettified):
import "dart:mirrors" as p;
class Foo{static String bar='...';}
class p_Foo{static String p_bar='...';}
void main(){
  print(p.reflectClass(Foo).members[const Symbol(r'bar')]);
  print(p.reflectClass(p_Foo).members[const Symbol(r'bar')]);
}

Where second print prints null after dart2dart.

@iposva-google
Copy link
Contributor

Added Area-Dart2Dart, Triaged labels.

@sethladd sethladd added the closed-not-planned Closed as we don't intend to take action on the reported issue label Jul 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue
Projects
None yet
Development

No branches or pull requests

4 participants