Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 22292002: Reflection on generics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/lib/mirrors_impl.dart
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 5fb76c7c6bf92029ba1a117eb97ee0ec31daaa6c..8bd1f7f0a1795ddbbb05319f14265fefdcd99a12 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -501,9 +501,12 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
return _typeVariables;
}
+ Map<Symbol, TypeMirror> _typeArguments = null;
Map<Symbol, TypeMirror> get typeArguments {
- throw new UnimplementedError(
- 'ClassMirror.typeArguments is not implemented');
+ if(_typeArguments == null) {
+ _typeArguments = _computeTypeArguments(_reflectee);
+ }
+ return _typeArguments;
}
bool get isOriginalDeclaration {
@@ -595,6 +598,9 @@ class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
static _ClassMirror_type_variables(reflectee)
native "ClassMirror_type_variables";
+
+ static _computeTypeArguments(reflectee)
+ native "ClassMirror_type_arguments";
}
class _LocalFunctionTypeMirrorImpl extends _LocalClassMirrorImpl

Powered by Google App Engine
This is Rietveld 408576698