Index: tests/lib/mirrors/method_mirror_source_test.dart |
diff --git a/tests/lib/mirrors/method_mirror_source_test.dart b/tests/lib/mirrors/method_mirror_source_test.dart |
index 094e36d73ce1d89afc6e33f76d9ad388010a36b1..2507915ec17e8c1e2246e5706a920b95c13913bb 100644 |
--- a/tests/lib/mirrors/method_mirror_source_test.dart |
+++ b/tests/lib/mirrors/method_mirror_source_test.dart |
@@ -7,11 +7,14 @@ import "dart:mirrors"; |
import "package:expect/expect.dart"; |
expectSource(Mirror mirror, String source) { |
+ MethodMirror methodMirror; |
if (mirror is ClosureMirror) { |
- mirror = mirror.function; |
+ methodMirror = mirror.function; |
+ } else { |
+ methodMirror = mirror as MethodMirror; |
} |
- Expect.isTrue(mirror is MethodMirror); |
- Expect.equals(mirror.source, source); |
+ Expect.isTrue(methodMirror is MethodMirror); |
+ Expect.equals(methodMirror.source, source); |
} |
foo1() {} |