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

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

Issue 360493002: Emit declarations for typedefs that are needed by reflection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 4 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 | « tests/lib/lib.status ('k') | tests/lib/mirrors/typedef_declaration_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2c2c525214281021de5f107009412a9cd8da9ba2..2e8bbc24793d60b9e35945b73fc041ec7da894b7 100644
--- a/tests/lib/mirrors/relation_subclass_test.dart
+++ b/tests/lib/mirrors/relation_subclass_test.dart
@@ -57,13 +57,12 @@ test(MirrorSystem mirrors) {
Expect.isFalse(Obj.isSubclassOf(Func));
// Function typedef.
- // 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);
+ 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];
isArgumentOrTypeError(e) => e is ArgumentError || e is TypeError;
Expect.throws(() => Func.isSubclassOf(NumPred), isArgumentOrTypeError);
« no previous file with comments | « tests/lib/lib.status ('k') | tests/lib/mirrors/typedef_declaration_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698