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

Unified Diff: tests/lib/mirrors/mirrors_reader_test.dart

Issue 922023002: Implement DeclarationMirror.location for all but ParameterMirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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: tests/lib/mirrors/mirrors_reader_test.dart
diff --git a/tests/lib/mirrors/mirrors_reader_test.dart b/tests/lib/mirrors/mirrors_reader_test.dart
index e66c5f0db869cec3ac5ef510aad7dc666e5f5712..5528701e01f8861ddcc7d75b1016bd688f4d53f8 100644
--- a/tests/lib/mirrors/mirrors_reader_test.dart
+++ b/tests/lib/mirrors/mirrors_reader_test.dart
@@ -33,6 +33,9 @@ class RuntimeMirrorsReader extends MirrorsReader {
bool allowUnsupported(var receiver, String tag, UnsupportedError exception) {
if (mirrorSystemType == '_LocalMirrorSystem') {
// VM mirror system.
+ if (tag.endsWith('location')) {
+ return receiver is ParameterMirror;
+ }
} else if (mirrorSystemType == 'JsMirrorSystem') {
// Dart2js runtime mirror system.
if (tag.endsWith('.metadata')) {
@@ -48,9 +51,6 @@ class RuntimeMirrorsReader extends MirrorsReader {
if (mirrorSystemType == '_LocalMirrorSystem') {
// VM mirror system.
- if (receiver is DeclarationMirror && tag == 'location') {
- return receiver is! MethodMirror;
- }
} else if (mirrorSystemType == 'JsMirrorSystem') {
// Dart2js runtime mirror system.
if (receiver is DeclarationMirror && tag == 'location') {
« no previous file with comments | « tests/lib/mirrors/method_mirror_location_test.dart ('k') | tests/lib/mirrors/other_declarations_location_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698