You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I decided to create a new issue since the previous one was closed (https://code.google.com/p/dart/issues/detail?id=16244). Although in the previous issue it was said that it was fixed in the 1.2 release, it is not and I still have the following problem when trying to run compiled code. Here's the relevant part of the Dart source code:
List findSubclasses(name) {
final ms = currentMirrorSystem();
List subclasses = [];
ms.libraries.forEach((k,lib) {
lib.declarations.forEach((k2, c) {
if(c is ClassMirror && c.superclass != null) {
final parentClassName = MirrorSystem.getName(c.superclass.simpleName);
if (parentClassName == name) {
subclasses.add(c);
}
}
});
});
return subclasses;
}
After compiling to Javascript with dart2js (v 1.2), I'm starting to get the following error:
This issue was originally filed by @snitko
I decided to create a new issue since the previous one was closed (https://code.google.com/p/dart/issues/detail?id=16244). Although in the previous issue it was said that it was fixed in the 1.2 release, it is not and I still have the following problem when trying to run compiled code. Here's the relevant part of the Dart source code:
List findSubclasses(name) {
final ms = currentMirrorSystem();
List subclasses = [];
ms.libraries.forEach((k,lib) {
lib.declarations.forEach((k2, c) {
if(c is ClassMirror && c.superclass != null) {
final parentClassName = MirrorSystem.getName(c.superclass.simpleName);
if (parentClassName == name) {
subclasses.add(c);
}
}
});
});
return subclasses;
}
After compiling to Javascript with dart2js (v 1.2), I'm starting to get the following error:
Uncaught Unsupported operation: Cannot find class for: Closure:350 js_helper.dart:1058
wrapExceptionjs_helper.dart:1058
reflectClassByNamejs_mirrors.dart:550
reflectClassByMangledNamejs_mirrors.dart:520
JsClassMirror.get$superclassjs_mirrors.dart:1474
findSubclasses__closure.call$2find_subclasses.dart:10
_LinkedHashMap.forEach$1.H.computeSignature.funccollection_patch.dart:654
J.forEach$1$axbtc_trader.js:82924
UnmodifiableMapView.forEach$1.H.computeSignature.funcjs_mirrors.dart:2376
J.forEach$1$axbtc_trader.js:82924
findSubclasses_closure.call$2find_subclasses.dart:9
_LinkedHashMap.forEach$1.H.computeSignature.funccollection_patch.dart:654
J.forEach$1$axbtc_trader.js:82924
UnmodifiableMapView.forEach$1.H.computeSignature.funcjs_mirrors.dart:2376
J.forEach$1$axbtc_trader.js:82924
findSubclassesfind_subclasses.dart:8
(anonymous function)template.dart:16
prototype.(anonymous function)btc_trader.js:96298
Template.Template$1template.dart:45
Template.static.Template$js_helper.dart:1667
TemplateStack_collect_closure.call$1template_stack.dart:9
ListMixin.forEach$1.H.computeSignature.funclist.dart:55
J.forEach$1$axbtc_trader.js:82924
TemplateStack.static.TemplateStack_collecttemplate_stack.dart:8
maincomponent_temple.dart:21
_IsolateContext.eval$1isolate_helper.dart:247
startRootIsolateisolate_helper.dart:67
(anonymous function)btc_trader.js:96069
init.currentScriptbtc_trader.js:96049
(anonymous function)
The line that the output complains is this one (it is from the code above):
if(c is ClassMirror && c.superclass != null) {
I guess something's not working quite well with compiling mirrors functionality here.
The text was updated successfully, but these errors were encountered: