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

Unified Diff: pkg/unittest/lib/mirror_matchers.dart

Issue 63363003: Cascaded mirror removal revert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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: pkg/unittest/lib/mirror_matchers.dart
diff --git a/pkg/unittest/lib/mirror_matchers.dart b/pkg/unittest/lib/mirror_matchers.dart
index 93656807269d3a82093826b4c84fa4af2c7f29e9..7d1597f2ac27f59c752109141a93a6a58ce6c51c 100644
--- a/pkg/unittest/lib/mirror_matchers.dart
+++ b/pkg/unittest/lib/mirror_matchers.dart
@@ -49,13 +49,7 @@ class _HasProperty extends Matcher {
var mirror = reflect(item);
var classMirror = mirror.type;
var symbol = new Symbol(_name);
- bool hasGetter(classMirror, getterName) {
- var candidate = classMirror.declarations[getterName];
- return candidate != null &&
- candidate is MethodMirror &&
- candidate.isGetter;
- }
- if (!hasGetter(classMirror, symbol)) {
+ if (!classMirror.getters.containsKey(symbol)) {
addStateInfo(matchState, {'reason': 'has no property named "$_name"'});
return false;
}
« no previous file with comments | « pkg/serialization/lib/src/serialization_rule.dart ('k') | runtime/tests/vm/dart/mirrored_compilation_error_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698