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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 19473005: Address some drive-by comments: equality without hash, types in the instantiation expression. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors_impl.dart
===================================================================
--- runtime/lib/mirrors_impl.dart (revision 25477)
+++ runtime/lib/mirrors_impl.dart (working copy)
@@ -20,7 +20,7 @@
}
Map _makeMemberMap(List mirrors) {
- Map<Symbol, dynamic> result = new Map();
+ Map result = new Map<Symbol, dynamic>();
mirrors.forEach((mirror) => result[mirror.simpleName] = mirror);
return result;
}
@@ -636,7 +636,7 @@
const {},
const {});
- Map<Symbol, Mirror> get members => const {};
+ Map<Symbol, Mirror> get members => new Map<Symbol,Mirror>();
var _returnType;
TypeMirror get returnType {
@@ -1152,6 +1152,8 @@
}
return this.simpleName == other.simpleName;
}
+
+ int get hashCode => simpleName.hashCode;
}
class _Mirrors {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698