VariableMirror.type of Queue throws TypeError #16070
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
closed-not-planned
Closed as we don't intend to take action on the reported issue
library-mirrors
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
This issue was originally filed by @denniskaselow
What steps will reproduce the problem?
Run this code as javascript:
import 'dart:html';
import 'dart:collection';
@MirrorsUsed(targets: const [A])
import 'dart:mirrors';
void main() {
var cm = reflectClass(A);
cm.declarations.values.where((d) => d is VariableMirror)
.forEach((vm) => print(vm.type));
}
class A {
B foo;
List<int> bar;
Queue<int> foobar;
}
class B {}
What is the expected output? What do you see instead?
Running this as javascript gives following output in chrome:
TypeMirror on 'dynamic'
ClassMirror on 'List'
Uncaught TypeError: Cannot read property 'builtin$cls' of undefined
I would expect
TypeMirror on 'dynamic'
for the Queue.
What version of the product are you using? On what operating system?
Dart Editor version 1.1.0.dev_05_06 (DEV)
Dart SDK version 1.1.0-dev.5.6
Please provide any additional information below.
If I add Queue to the list of targets in MirrorsUsed it works and outputs ClassMirror on 'Queue'. But I would be fine if it would just output TypeMirror on 'dynamic' like it does for B. So far, Queue is the only class that I've run into that produces this error.
The text was updated successfully, but these errors were encountered: