Index: tests/language/generic_methods_new_test.dart |
diff --git a/tests/language/generic_methods_new_test.dart b/tests/language/generic_methods_new_test.dart |
index ea23b949d91dcf095a20b2964ef396bdb0bd25ff..d0acd0a8d19b5f341924f470cc0148e7aa856ded 100644 |
--- a/tests/language/generic_methods_new_test.dart |
+++ b/tests/language/generic_methods_new_test.dart |
@@ -21,6 +21,8 @@ C<T> f1<T>(T t) => new C<T>(t); |
List<T> f2<T>(T t) => <T>[t]; |
+Map<T, String> f3<T>(T t) => <T, String>{t: 'hi'}; |
+ |
main() { |
C c = f1<int>(42); |
List i = f2<String>("Hello!"); |
@@ -28,4 +30,9 @@ main() { |
Expect.isTrue(i is List<String> && i is List<int>); // List<dynamic>. |
Expect.equals(c.e, 42); |
Expect.equals(i[0], "Hello!"); |
+ |
+ Map m1 = f3<int>(1); |
+ Expect.isTrue(m1 is Map<int, String> && m1 is Map<String, String>); |
+ Expect.isFalse(m1 is Map<int, int>); |
+ Expect.equals('hi', m1[1]); |
} |