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

Calling originalDeclaration on ClassMirror throws NoSuchMethodException #7957

Closed
sethladd opened this issue Jan 17, 2013 · 4 comments
Closed

Comments

@sethladd
Copy link
Contributor

This code:

import 'dart:mirrors';

main() {
  var myList = new List<String>();
  InstanceMirror mirror = reflect(myList);
  ClassMirror classMirror = mirror.type;
  print(classMirror.originalDeclaration);
}

throws:

Unhandled exception:
NoSuchMethodError : method not found: 'originalDeclaration'
Receiver: Instance of '_LocalClassMirrorImpl@0x4863bc9'
Arguments: []

­0 Object._noSuchMethod (dart:core-patch:1689:3)

­1 Object.noSuchMethod (dart:core-patch:1690:25)

­2 main (file:///Users/sethladd/dart/simpletests/bin/mirrors.dart:7:15)

On Dart Editor version 0.3.0_r17072

@sethladd
Copy link
Contributor Author

@DartBot
Copy link

DartBot commented May 14, 2013

This comment was originally written by @sethladd


This still fails with a runtime error. Is it supposed to work?

The error I get now is: Breaking on exception: Class '_LocalClassMirrorImpl' has no instance getter 'originalDeclaration'.

Maybe mark this bug as a Mirror bugs?

@iposva-google
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-Unassigned label.

@iposva-google
Copy link
Contributor

Currently prints:
$ dart ~/dart/Bug7957.dart
ClassMirror on '_GrowableList'
$


Set owner to @rmacnak-google.
Added Library-Mirrors, Fixed labels.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants