OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // Dart test program for constructors and initializers. | 4 // Dart test program for constructors and initializers. |
5 | 5 |
6 // Check function subtyping for local functions against generic typedefs. | 6 // Check function subtyping for local functions against generic typedefs. |
7 | 7 |
8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
9 | 9 |
10 typedef int Foo<T>(T a, [String b]); | 10 typedef int Foo<T>(T a, [String b]); |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 Expect.isFalse(baz is Foo<int>, 'baz is Foo<int>'); | 39 Expect.isFalse(baz is Foo<int>, 'baz is Foo<int>'); |
40 Expect.isFalse(baz is Bar<int>, 'baz is Bar<int>'); | 40 Expect.isFalse(baz is Bar<int>, 'baz is Bar<int>'); |
41 Expect.isFalse(baz is Baz<int>, 'baz is Baz<int>'); | 41 Expect.isFalse(baz is Baz<int>, 'baz is Baz<int>'); |
42 Expect.isFalse(baz is Boz<int>, 'baz is Boz<int>'); | 42 Expect.isFalse(baz is Boz<int>, 'baz is Boz<int>'); |
43 | 43 |
44 Expect.isFalse(baz is Foo, 'baz is Foo'); | 44 Expect.isFalse(baz is Foo, 'baz is Foo'); |
45 Expect.isFalse(baz is Bar, 'baz is Bar'); | 45 Expect.isFalse(baz is Bar, 'baz is Bar'); |
46 Expect.isTrue(baz is Baz, 'baz is Baz'); | 46 Expect.isTrue(baz is Baz, 'baz is Baz'); |
47 Expect.isTrue(baz is Boz, 'baz is Boz'); | 47 Expect.isTrue(baz is Boz, 'baz is Boz'); |
48 } | 48 } |
OLD | NEW |