Dart Mirrors in JS: type '_ListConstructorSentinel' is not a subtype of type 'int' -


the following code executes fine on vm, fails

"'_listconstructorsentinel' not subtype of type 'int'"

when converted javascript via dart2js. i'm using "pub run test -p chrome " run code.

import "dart:mirrors";  main() {   typemirror tm = new typetoken<list<string>>().typemirror;   (tm classmirror).newinstance(const symbol(""), []); }  class typetoken<t> {   typemirror typemirror => reflecttype(t); } 

stacktrace:

type '_listconstructorsentinel' not subtype of type 'int'   error.dart.browser_test.dart.js 4385:15    dart.wrapexception   error.dart.browser_test.dart.js 4604:13    dart.inttypecheck   error.dart.browser_test.dart.js 36709:11   isolate.dart.list.static.list_list.h.computesignature.func   error.dart.browser_test.dart.js 13292:31   jsmethodmirror.dart.jsmethodmirror._invoke$2   error.dart.browser_test.dart.js 12724:21   jsclassmirror.dart.jsclassmirror._getinvokedinstance$3   error.dart.browser_test.dart.js 12054:30   jstypeboundclassmirror.<fn>   error.dart.browser_test.dart.js 12058:19   jstypeboundclassmirror.dart.jstypeboundclassmirror.newinstance$3   error.dart.browser_test.dart.js 85680:232  dart.main0   error.dart.browser_test.dart.js 15329:32   dart.future.static.future_future$sync.h.computesignature.func   error.dart.browser_test.dart.js 97668:16   iframelistener_start_closure.dart.iframelistener_start_closure.call$0 

am doing shouldn't allowed, or bug? if it's bug, there way work around it?

thanks in advance!

looks known issue: github.com/dart-lang/sdk/issues/21927


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -