Index: tests/language/generic_methods_type_expression_test.dart |
diff --git a/tests/language/generic_methods_type_expression_test.dart b/tests/language/generic_methods_type_expression_test.dart |
index cbe08026c4f5fb7743a57f4c3e6910d5097ae462..70e17739d9839f2078f8387ea6af777d5a7fc9fb 100644 |
--- a/tests/language/generic_methods_type_expression_test.dart |
+++ b/tests/language/generic_methods_type_expression_test.dart |
@@ -32,6 +32,13 @@ class TypeValue<X> { |
Type f8<T>() => new TypeValue<List<T>>().value; |
+bool f9<T>(Object o) => o is Map<T, String>; |
+ |
+class IsMap<A> { |
+ @NoInline() |
+ bool check<B>(o) => o is Map<A, B>; |
+} |
+ |
main() { |
String s = "Hello!"; |
List<String> ss = <String>[s]; |
@@ -49,4 +56,11 @@ main() { |
Expect.equals(f6<int>(ss), ss); // `as List<dynamic>` succeeds. |
Expect.throws(() => f7<int>(), (e) => e is TypeError); |
Expect.equals(f8<int>(), List); // Returns `List<dynamic>`. |
+ |
+ Expect.isTrue(f9<int>(<int,String>{})); |
+ Expect.isTrue(f9<int>(<bool,String>{})); // `is Map<dynamic, String>` is true. |
+ Expect.isFalse(f9<int>(<int,int>{})); |
+ |
+ Expect.isTrue(new IsMap<int>().check<String>(<int,String>{})); |
+ Expect.isTrue(new IsMap<int>().check<int>(<int,String>{})); |
} |