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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 140313005: Fix non-specific type parameter in member maps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: year Created 6 years, 11 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
« no previous file with comments | « no previous file | tests/lib/mirrors/declarations_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors_impl.dart
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index cd8182f713c69e43510b4beb22e21adf14c6cc26..310c9f7b48b997589ce658ab2ed42fdff2009365 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -52,8 +52,9 @@ Map _filterMap(Map<Symbol, dynamic> old_map, bool filter(Symbol key, value)) {
}
Map _makeMemberMap(List mirrors) {
- return new _UnmodifiableMapView(
- new Map<Symbol, dynamic>.fromIterable(mirrors, key: (e) => e.simpleName));
+ return new _UnmodifiableMapView<Symbol, DeclarationMirror>(
+ new Map<Symbol, DeclarationMirror>.fromIterable(
+ mirrors, key: (e) => e.simpleName));
}
String _n(Symbol symbol) => _symbol_dev.Symbol.getName(symbol);
@@ -653,7 +654,8 @@ class _LocalClassMirror extends _LocalObjectMirror
var constructorsList = _computeConstructors(_reflectee);
var stringName = _n(simpleName);
constructorsList.forEach((c) => c._patchConstructorName(stringName));
- _cachedConstructors = _makeMemberMap(constructorsList);
+ _cachedConstructors =
+ new Map.fromIterable(constructorsList, key: (e) => e.simpleName);
}
return _cachedConstructors;
}
« no previous file with comments | « no previous file | tests/lib/mirrors/declarations_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698