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

dart2js bug in classMirror.metadata: metadata should not be inherited #14559

Closed
sigmundch opened this issue Oct 29, 2013 · 3 comments
Closed
Assignees
Labels
closed-obsolete Closed as the reported issue is no longer relevant library-mirrors type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js

Comments

@sigmundch
Copy link
Member

Dart2js and the Dartvm seem inconsistent in the implementation of ClassMirror.metadata. Looking at the api, it seems that the vm behavior matches what's documented.

Here is a test case that can be used to repro this:

  import 'dart:mirrors';
  const meta = "annotation";

  @­meta
  class A {}

  class B extends A {}

  main() {
    print('A: ${reflectClass(A).metadata.length}');
    print('B: ${reflectClass(B).metadata.length}');
  }

The dartvm will print:
  A: 1
  B: 0

dart2js will print:
  A: 1
  B: 1

@peter-ahe-google
Copy link
Contributor

Strange, I don't know how metadata could be inherited.


Set owner to @peter-ahe-google.
Added Library-Mirrors, Accepted labels.

@peter-ahe-google
Copy link
Contributor

Marked this as blocking #6490.

@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Mar 3, 2018
@matanlurey
Copy link
Contributor

Mirrors is no longer supported in Dart2JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-obsolete Closed as the reported issue is no longer relevant library-mirrors type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js
Projects
None yet
Development

No branches or pull requests

4 participants