Chromium Code Reviews| Index: sdk/lib/_internal/lib/js_mirrors.dart |
| diff --git a/sdk/lib/_internal/lib/js_mirrors.dart b/sdk/lib/_internal/lib/js_mirrors.dart |
| index 2887c43e96c54ee929b4c4cdeee517e96f7c0d8f..9461d92a85b88eb54b4bc56b69ec85b7607339e8 100644 |
| --- a/sdk/lib/_internal/lib/js_mirrors.dart |
| +++ b/sdk/lib/_internal/lib/js_mirrors.dart |
| @@ -27,7 +27,8 @@ import 'dart:_js_helper' show |
| getMangledTypeName, |
| throwInvalidReflectionError, |
| hasReflectableProperty, |
| - runtimeTypeToString; |
| + runtimeTypeToString, |
| + TypeVariable; |
| import 'dart:_interceptors' show |
| Interceptor, |
| JSExtendableArray; |
| @@ -1320,12 +1321,13 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
| List typeVars = |
| JS('JSExtendableArray|Null', '#.prototype["<>"]', _jsConstructor); |
| if (typeVars == null) return result; |
| - for (int i = 0; i < typeVars.length; i += 2) { |
| + for (int i = 0; i < typeVars.length; i++) { |
| + TypeVariable typeVar = JS('', 'init.metadata[#]', typeVars[i]); |
| + var bound = JS('', 'init.metadata[#]', typeVar.bound); |
| TypeMirror upperBound = |
| - typeMirrorFromRuntimeTypeRepresentation(JS('', 'init.metadata[#]', |
| - typeVars[i+1])); |
| - var typeMirror = |
| - new JsTypeVariableMirror(s(typeVars[i]), upperBound, this); |
| + typeMirrorFromRuntimeTypeRepresentation(bound); |
| + TypeVariableMirror typeMirror = |
| + new JsTypeVariableMirror(s(typeVar.name), upperBound, this); |
|
ahe
2013/10/14 13:07:07
Why isn't this simply:
TypeVariable typeVar = JS(
zarah
2013/10/15 14:20:02
Done.
|
| result.add(typeMirror); |
| } |
| return _cachedTypeVariables = new UnmodifiableListView(result); |