Index: tests/lib/mirrors/relation_subclass_test.dart |
diff --git a/tests/lib/mirrors/relation_subclass_test.dart b/tests/lib/mirrors/relation_subclass_test.dart |
index 2e8bbc24793d60b9e35945b73fc041ec7da894b7..2c2c525214281021de5f107009412a9cd8da9ba2 100644 |
--- a/tests/lib/mirrors/relation_subclass_test.dart |
+++ b/tests/lib/mirrors/relation_subclass_test.dart |
@@ -57,12 +57,13 @@ test(MirrorSystem mirrors) { |
Expect.isFalse(Obj.isSubclassOf(Func)); |
// Function typedef. |
- var NumPred = thisLibrary.declarations[#NumberPredicate]; |
- var IntPred = thisLibrary.declarations[#IntegerPredicate]; |
- var DubPred = thisLibrary.declarations[#DoublePredicate]; |
- var NumGen = thisLibrary.declarations[#NumberGenerator]; |
- var IntGen = thisLibrary.declarations[#IntegerGenerator]; |
- var DubGen = thisLibrary.declarations[#DoubleGenerator]; |
+ // TODO(16939): retrieve via declaration when dart2js supports it. |
+ var NumPred = reflectType(NumberPredicate); |
+ var IntPred = reflectType(IntegerPredicate); |
+ var DubPred = reflectType(DoublePredicate); |
+ var NumGen = reflectType(NumberGenerator); |
+ var IntGen = reflectType(IntegerGenerator); |
+ var DubGen = reflectType(DoubleGenerator); |
isArgumentOrTypeError(e) => e is ArgumentError || e is TypeError; |
Expect.throws(() => Func.isSubclassOf(NumPred), isArgumentOrTypeError); |