Index: tests/language/src/FunctionTypeAliasTest.dart |
diff --git a/tests/language/src/FunctionTypeAliasTest.dart b/tests/language/src/FunctionTypeAliasTest.dart |
index f24fdda73769a36fcf1158d8a6e496f913a2dadf..3029e44d28a686358b0be3339338d3fcc67425da 100644 |
--- a/tests/language/src/FunctionTypeAliasTest.dart |
+++ b/tests/language/src/FunctionTypeAliasTest.dart |
@@ -24,12 +24,14 @@ typedef ParametrizedFun1<T, U extends bool, V>(T t, U u); |
typedef List<T> ParametrizedFun2<T, U, V extends Map<T, int>>( |
Map<T, int> t, U u); |
+typedef void BoundsCheck<T extends num>(T arg); |
+ |
class FunctionTypeAliasTest { |
FunctionTypeAliasTest() {} |
static int test(CompareObj compare, Object a, Object b) { |
return compare(a, b); |
} |
- foo(Test test) {} |
+ foo(Test arg) {} |
static bar() { |
FunctionTypeAliasTest a = new FunctionTypeAliasTest(); |
a.foo(() { }); |
@@ -93,6 +95,11 @@ class FunctionTypeAliasTest { |
Expect.isTrue(plus is !CompareString); |
Expect.equals(0, bar()); |
+ |
+ Function boundsTrue = void _(int arg) { }; |
+ Function boundsFalse = void _(String arg) { }; |
+ Expect.isTrue(boundsTrue is BoundsCheck<num>); |
+ Expect.isFalse(boundsFalse is BoundsCheck<num>); |
} |
} |