OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 | 4 |
5 // GENERATED - DON'T EDIT. | 5 // GENERATED - DON'T EDIT. |
6 // GENERATED - DON'T EDIT. | 6 // GENERATED - DON'T EDIT. |
7 // GENERATED - DON'T EDIT. | 7 // GENERATED - DON'T EDIT. |
8 // GENERATED - DON'T EDIT. | 8 // GENERATED - DON'T EDIT. |
9 // GENERATED - DON'T EDIT. | 9 // GENERATED - DON'T EDIT. |
10 // GENERATED - DON'T EDIT. | 10 // GENERATED - DON'T EDIT. |
11 // GENERATED - DON'T EDIT. | 11 // GENERATED - DON'T EDIT. |
12 // GENERATED - DON'T EDIT. | 12 // GENERATED - DON'T EDIT. |
13 | 13 |
14 import 'dart:core'; | 14 import 'dart:core'; |
15 import 'dart:core' as core; | 15 import 'dart:core' as core; |
16 import 'package:expect/expect.dart'; | 16 import 'package:expect/expect.dart'; |
17 | 17 |
18 @NoInline() | 18 @NoInline() |
19 @AssumeDynamic() | 19 @AssumeDynamic() |
20 confuse(f) => f; | 20 confuse(f) => f; |
21 | 21 |
22 final bool inCheckedMode = | 22 final bool inCheckedMode = (() { |
23 (() { bool result = false; assert(result = true); return result; })(); | 23 bool result = false; |
| 24 assert(result = true); |
| 25 return result; |
| 26 })(); |
24 | 27 |
25 | 28 typedef F0<T> |
26 typedef F0<T> = Function Function(int x); | 29 = Function Function(int x); |
27 typedef F1<T> = List<Function> Function(List<T> x); | 30 typedef F1<T> |
28 typedef F2<T> = List<T> Function(int y, {List<Function> x}); | 31 = List<Function> Function(List<T> x); |
29 typedef F3<T> = void Function(int x0, {Function x}); | 32 typedef F2<T> |
30 typedef F4<T> = void Function<A>(int x); | 33 = List<T> Function(int y, {List<Function> x}); |
31 typedef F5<T> = int Function([List<Function> x]) Function(); | 34 typedef F3<T> |
32 typedef F6<T> = int Function(List<T> x0) Function(); | 35 = void Function(int x0, {Function x}); |
33 typedef F7<T> = Function Function(int x1, [Function x2]) Function(); | 36 typedef F4<T> |
34 typedef F8<T> = Function Function(int x0, {core.List<core.int> x}) Function(); | 37 = void Function<A>(int x); |
35 typedef F9<T> = List<Function> Function(Function x) Function(); | 38 typedef F5<T> |
36 typedef F10<T> = List<Function> Function(int y, [core.List<core.int> x]) Functio
n(); | 39 = int Function([List<Function> x]) Function(); |
37 typedef F11<T> = core.List<core.int> Function([int x1]) Function(); | 40 typedef F6<T> |
38 typedef F12<T> = core.List<core.int> Function({List<Function> x}) Function(); | 41 = int Function(List<T> x0) Function(); |
39 typedef F13<T> = core.List<core.int> Function() Function(); | 42 typedef F7<T> |
40 typedef F14<T> = List<T> Function(int x0, [List<Function> x]) Function(); | 43 = Function Function(int x1, [Function x2]) Function(); |
41 typedef F15<T> = List<T> Function([List<T> x1]) Function(); | 44 typedef F8<T> |
42 typedef F16<T> = Function(int x, [Function x2]) Function(); | 45 = Function Function(int x0, {core.List<core.int> x}) Function(); |
43 typedef F17<T> = Function(int y, {core.List<core.int> x}) Function(); | 46 typedef F9<T> |
44 typedef F18<T> = void Function([Function x]) Function(); | 47 = List<Function> Function(Function x) Function(); |
45 typedef F19<T> = void Function(core.List<core.int> x0) Function(); | 48 typedef F10<T> |
46 typedef F20<T> = int Function<A>(A x) Function(); | 49 = List<Function> Function(int y, [core.List<core.int> x]) Function(); |
47 typedef F21<T> = core.List<core.int> Function<A>(List<A> x) Function(); | 50 typedef F11<T> |
48 typedef F22<T> = List<A> Function<A>(int x) Function(); | 51 = core.List<core.int> Function([int x1]) Function(); |
49 | 52 typedef F12<T> |
| 53 = core.List<core.int> Function({List<Function> x}) Function(); |
| 54 typedef F13<T> |
| 55 = core.List<core.int> Function() Function(); |
| 56 typedef F14<T> |
| 57 = List<T> Function(int x0, [List<Function> x]) Function(); |
| 58 typedef F15<T> |
| 59 = List<T> Function([List<T> x1]) Function(); |
| 60 typedef F16<T> |
| 61 = Function(int x, [Function x2]) Function(); |
| 62 typedef F17<T> |
| 63 = Function(int y, {core.List<core.int> x}) Function(); |
| 64 typedef F18<T> |
| 65 = void Function([Function x]) Function(); |
| 66 typedef F19<T> |
| 67 = void Function(core.List<core.int> x0) Function(); |
| 68 typedef F20<T> |
| 69 = int Function<A>(A x) Function(); |
| 70 typedef F21<T> |
| 71 = core.List<core.int> Function<A>(List<A> x) Function(); |
| 72 typedef F22<T> |
| 73 = List<A> Function<A>(int x) Function(); |
50 | 74 |
51 Function f0(int x) => null; | 75 Function f0(int x) => null; |
52 List<Function> f1(List<int> x) => null; | 76 List<Function> f1(List<int> x) => null; |
53 List<int> f2(int y, {List<Function> x}) => null; | 77 List<int> f2(int y, {List<Function> x}) => null; |
54 void f3(int x0, {Function x}) => null; | 78 void f3(int x0, {Function x}) => null; |
55 void f4<A>(int x) => null; | 79 void f4<A>(int x) => null; |
56 int Function([List<Function> x]) f5() => null; | 80 int Function([List<Function> x]) f5() => null; |
57 int Function(List<int> x0) f6() => null; | 81 int Function(List<int> x0) f6() => null; |
58 Function Function(int x0, [Function x1]) f7() => null; | 82 Function Function(int x0, [Function x1]) f7() => null; |
59 Function Function(int x0, {core.List<core.int> x}) f8() => null; | 83 Function Function(int x0, {core.List<core.int> x}) f8() => null; |
60 List<Function> Function(Function x) f9() => null; | 84 List<Function> Function(Function x) f9() => null; |
61 List<Function> Function(int y, [core.List<core.int> x]) f10() => null; | 85 List<Function> Function(int y, [core.List<core.int> x]) f10() => null; |
62 core.List<core.int> Function([int x0]) f11() => null; | 86 core.List<core.int> Function([int x0]) f11() => null; |
63 core.List<core.int> Function({List<Function> x}) f12() => null; | 87 core.List<core.int> Function({List<Function> x}) f12() => null; |
64 core.List<core.int> Function() f13() => null; | 88 core.List<core.int> Function() f13() => null; |
65 List<int> Function(int x0, [List<Function> x]) f14() => null; | 89 List<int> Function(int x0, [List<Function> x]) f14() => null; |
66 List<int> Function([List<int> x0]) f15() => null; | 90 List<int> Function([List<int> x0]) f15() => null; |
67 Function(int x, [Function x0]) f16() => null; | 91 Function(int x, [Function x0]) f16() => null; |
68 Function(int y, {core.List<core.int> x}) f17() => null; | 92 Function(int y, {core.List<core.int> x}) f17() => null; |
69 void Function([Function x]) f18() => null; | 93 void Function([Function x]) f18() => null; |
70 void Function(core.List<core.int> x0) f19() => null; | 94 void Function(core.List<core.int> x0) f19() => null; |
71 int Function<A>(A x) f20() => null; | 95 int Function<A>(A x) f20() => null; |
72 core.List<core.int> Function<A>(List<A> x) f21() => null; | 96 core.List<core.int> Function<A>(List<A> x) f21() => null; |
73 List<A> Function<A>(int x) f22() => null; | 97 List<A> Function<A>(int x) f22() => null; |
74 | 98 |
75 | |
76 class U56<T> { | 99 class U56<T> { |
77 final bool tIsBool; | 100 final bool tIsBool; |
78 final bool tIsInt; | 101 final bool tIsInt; |
79 final bool tIsDynamic; | 102 final bool tIsDynamic; |
80 | 103 |
81 Function Function(int x) x0; | 104 Function Function(int x) x0; |
82 List<Function> Function(List<T> x) x1; | 105 List<Function> Function(List<T> x) x1; |
83 List<T> Function(int y, {List<Function> x}) x2; | 106 List<T> Function(int y, {List<Function> x}) x2; |
84 void Function(int x0, {Function x}) x3; | 107 void Function(int x0, {Function x}) x3; |
85 void Function<A>(int x) x4; | 108 void Function<A>(int x) x4; |
86 int Function([List<Function> x]) Function() x5; | 109 int Function([List<Function> x]) Function() x5; |
87 int Function(List<T> x0) Function() x6; | 110 int Function(List<T> x0) Function() x6; |
88 Function Function(int x1, [Function x2]) Function() x7; | 111 Function Function(int x1, [Function x2]) Function() x7; |
89 Function Function(int x0, {core.List<core.int> x}) Function() x8; | 112 Function Function(int x0, {core.List<core.int> x}) Function() x8; |
90 List<Function> Function(Function x) Function() x9; | 113 List<Function> Function(Function x) Function() x9; |
91 List<Function> Function(int y, [core.List<core.int> x]) Function() x10; | 114 List<Function> Function(int y, [core.List<core.int> x]) Function() x10; |
92 core.List<core.int> Function([int x1]) Function() x11; | 115 core.List<core.int> Function([int x1]) Function() x11; |
93 core.List<core.int> Function({List<Function> x}) Function() x12; | 116 core.List<core.int> Function({List<Function> x}) Function() x12; |
94 core.List<core.int> Function() Function() x13; | 117 core.List<core.int> Function() Function() x13; |
95 List<T> Function(int x0, [List<Function> x]) Function() x14; | 118 List<T> Function(int x0, [List<Function> x]) Function() x14; |
96 List<T> Function([List<T> x1]) Function() x15; | 119 List<T> Function([List<T> x1]) Function() x15; |
97 Function(int x, [Function x2]) Function() x16; | 120 Function(int x, [Function x2]) Function() x16; |
98 Function(int y, {core.List<core.int> x}) Function() x17; | 121 Function(int y, {core.List<core.int> x}) Function() x17; |
99 void Function([Function x]) Function() x18; | 122 void Function([Function x]) Function() x18; |
100 void Function(core.List<core.int> x0) Function() x19; | 123 void Function(core.List<core.int> x0) Function() x19; |
101 int Function<A>(A x) Function() x20; | 124 int Function<A>(A x) Function() x20; |
102 core.List<core.int> Function<A>(List<A> x) Function() x21; | 125 core.List<core.int> Function<A>(List<A> x) Function() x21; |
103 List<A> Function<A>(int x) Function() x22; | 126 List<A> Function<A>(int x) Function() x22; |
104 | 127 |
105 | |
106 U56({this.tIsBool: false, this.tIsInt: false}) | 128 U56({this.tIsBool: false, this.tIsInt: false}) |
107 : tIsDynamic = !tIsBool && !tIsInt; | 129 : tIsDynamic = !tIsBool && !tIsInt; |
108 | 130 |
109 Function m0(int x) => null; | 131 Function m0(int x) => null; |
110 List<Function> m1(List<T> x) => null; | 132 List<Function> m1(List<T> x) => null; |
111 List<T> m2(int y, {List<Function> x}) => null; | 133 List<T> m2(int y, {List<Function> x}) => null; |
112 void m3(int x0, {Function x}) => null; | 134 void m3(int x0, {Function x}) => null; |
113 void m4<A>(int x) => null; | 135 void m4<A>(int x) => null; |
114 int Function([List<Function> x]) m5() => null; | 136 int Function([List<Function> x]) m5() => null; |
115 int Function(List<T> x0) m6() => null; | 137 int Function(List<T> x0) m6() => null; |
116 Function Function(int x0, [Function x1]) m7() => null; | 138 Function Function(int x0, [Function x1]) m7() => null; |
117 Function Function(int x0, {core.List<core.int> x}) m8() => null; | 139 Function Function(int x0, {core.List<core.int> x}) m8() => null; |
118 List<Function> Function(Function x) m9() => null; | 140 List<Function> Function(Function x) m9() => null; |
119 List<Function> Function(int y, [core.List<core.int> x]) m10() => null; | 141 List<Function> Function(int y, [core.List<core.int> x]) m10() => null; |
120 core.List<core.int> Function([int x0]) m11() => null; | 142 core.List<core.int> Function([int x0]) m11() => null; |
121 core.List<core.int> Function({List<Function> x}) m12() => null; | 143 core.List<core.int> Function({List<Function> x}) m12() => null; |
122 core.List<core.int> Function() m13() => null; | 144 core.List<core.int> Function() m13() => null; |
123 List<T> Function(int x0, [List<Function> x]) m14() => null; | 145 List<T> Function(int x0, [List<Function> x]) m14() => null; |
124 List<T> Function([List<T> x0]) m15() => null; | 146 List<T> Function([List<T> x0]) m15() => null; |
125 Function(int x, [Function x0]) m16() => null; | 147 Function(int x, [Function x0]) m16() => null; |
126 Function(int y, {core.List<core.int> x}) m17() => null; | 148 Function(int y, {core.List<core.int> x}) m17() => null; |
127 void Function([Function x]) m18() => null; | 149 void Function([Function x]) m18() => null; |
128 void Function(core.List<core.int> x0) m19() => null; | 150 void Function(core.List<core.int> x0) m19() => null; |
129 int Function<A>(A x) m20() => null; | 151 int Function<A>(A x) m20() => null; |
130 core.List<core.int> Function<A>(List<A> x) m21() => null; | 152 core.List<core.int> Function<A>(List<A> x) m21() => null; |
131 List<A> Function<A>(int x) m22() => null; | 153 List<A> Function<A>(int x) m22() => null; |
132 | 154 |
133 | |
134 runTests() { | 155 runTests() { |
135 testF0(); | 156 testF0(); |
136 testF1(); | 157 testF1(); |
137 testF2(); | 158 testF2(); |
138 testF3(); | 159 testF3(); |
139 testF4(); | 160 testF4(); |
140 testF5(); | 161 testF5(); |
141 testF6(); | 162 testF6(); |
142 testF7(); | 163 testF7(); |
143 testF8(); | 164 testF8(); |
(...skipping 28 matching lines...) Expand all Loading... |
172 } | 193 } |
173 | 194 |
174 Expect.isTrue(m0 is F0); | 195 Expect.isTrue(m0 is F0); |
175 Expect.isTrue(m0 is Function Function(int x)); | 196 Expect.isTrue(m0 is Function Function(int x)); |
176 Expect.isTrue(confuse(m0) is F0); | 197 Expect.isTrue(confuse(m0) is F0); |
177 // In checked mode, verifies the type. | 198 // In checked mode, verifies the type. |
178 x0 = m0; | 199 x0 = m0; |
179 l0 = m0; | 200 l0 = m0; |
180 x0 = confuse(m0); | 201 x0 = confuse(m0); |
181 l0 = confuse(m0); | 202 l0 = confuse(m0); |
182 | |
183 } | 203 } |
184 | 204 |
185 /// List<Function> Function(List<T> x) | 205 /// List<Function> Function(List<T> x) |
186 void testF1() { | 206 void testF1() { |
187 Expect.isTrue(f1 is F1); | 207 Expect.isTrue(f1 is F1); |
188 Expect.isTrue(confuse(f1) is F1); | 208 Expect.isTrue(confuse(f1) is F1); |
189 // In checked mode, verifies the type. | 209 // In checked mode, verifies the type. |
190 List<Function> Function(List<T> x) l1; | 210 List<Function> Function(List<T> x) l1; |
191 // The static function f1 sets `T` to `int`. | 211 // The static function f1 sets `T` to `int`. |
192 if (!tIsBool) { | 212 if (!tIsBool) { |
(...skipping 13 matching lines...) Expand all Loading... |
206 l1 = confuse(m1); | 226 l1 = confuse(m1); |
207 if (!tIsBool) { | 227 if (!tIsBool) { |
208 Expect.isTrue(f1 is F1<int>); | 228 Expect.isTrue(f1 is F1<int>); |
209 Expect.isFalse(f1 is F1<bool>); | 229 Expect.isFalse(f1 is F1<bool>); |
210 Expect.isTrue(confuse(f1) is F1<int>); | 230 Expect.isTrue(confuse(f1) is F1<int>); |
211 Expect.isFalse(confuse(f1) is F1<bool>); | 231 Expect.isFalse(confuse(f1) is F1<bool>); |
212 Expect.equals(tIsDynamic, m1 is F1<bool>); | 232 Expect.equals(tIsDynamic, m1 is F1<bool>); |
213 Expect.equals(tIsDynamic, confuse(m1) is F1<bool>); | 233 Expect.equals(tIsDynamic, confuse(m1) is F1<bool>); |
214 } else { | 234 } else { |
215 if (inCheckedMode) { | 235 if (inCheckedMode) { |
216 Expect.throws(() { x1 = (f1 as dynamic); }); | 236 Expect.throws(() { |
217 Expect.throws(() { x1 = confuse(f1); }); | 237 x1 = (f1 as dynamic); |
| 238 }); |
| 239 Expect.throws(() { |
| 240 x1 = confuse(f1); |
| 241 }); |
218 List<Function> Function(List<T> x) l1; | 242 List<Function> Function(List<T> x) l1; |
219 Expect.throws(() { l1 = (f1 as dynamic); }); | 243 Expect.throws(() { |
220 Expect.throws(() { l1 = confuse(f1); }); | 244 l1 = (f1 as dynamic); |
| 245 }); |
| 246 Expect.throws(() { |
| 247 l1 = confuse(f1); |
| 248 }); |
221 } | 249 } |
222 List<Function> Function(List<T> x) l1 = m1; | 250 List<Function> Function(List<T> x) l1 = m1; |
223 // In checked mode, verifies the type. | 251 // In checked mode, verifies the type. |
224 x1 = m1; | 252 x1 = m1; |
225 x1 = confuse(m1); | 253 x1 = confuse(m1); |
226 } | 254 } |
227 } | 255 } |
228 | 256 |
229 /// List<T> Function(int y, {List<Function> x}) | 257 /// List<T> Function(int y, {List<Function> x}) |
230 void testF2() { | 258 void testF2() { |
(...skipping 19 matching lines...) Expand all Loading... |
250 l2 = confuse(m2); | 278 l2 = confuse(m2); |
251 if (!tIsBool) { | 279 if (!tIsBool) { |
252 Expect.isTrue(f2 is F2<int>); | 280 Expect.isTrue(f2 is F2<int>); |
253 Expect.isFalse(f2 is F2<bool>); | 281 Expect.isFalse(f2 is F2<bool>); |
254 Expect.isTrue(confuse(f2) is F2<int>); | 282 Expect.isTrue(confuse(f2) is F2<int>); |
255 Expect.isFalse(confuse(f2) is F2<bool>); | 283 Expect.isFalse(confuse(f2) is F2<bool>); |
256 Expect.equals(tIsDynamic, m2 is F2<bool>); | 284 Expect.equals(tIsDynamic, m2 is F2<bool>); |
257 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); | 285 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); |
258 } else { | 286 } else { |
259 if (inCheckedMode) { | 287 if (inCheckedMode) { |
260 Expect.throws(() { x2 = (f2 as dynamic); }); | 288 Expect.throws(() { |
261 Expect.throws(() { x2 = confuse(f2); }); | 289 x2 = (f2 as dynamic); |
| 290 }); |
| 291 Expect.throws(() { |
| 292 x2 = confuse(f2); |
| 293 }); |
262 List<T> Function(int y, {List<Function> x}) l2; | 294 List<T> Function(int y, {List<Function> x}) l2; |
263 Expect.throws(() { l2 = (f2 as dynamic); }); | 295 Expect.throws(() { |
264 Expect.throws(() { l2 = confuse(f2); }); | 296 l2 = (f2 as dynamic); |
| 297 }); |
| 298 Expect.throws(() { |
| 299 l2 = confuse(f2); |
| 300 }); |
265 } | 301 } |
266 List<T> Function(int y, {List<Function> x}) l2 = m2; | 302 List<T> Function(int y, {List<Function> x}) l2 = m2; |
267 // In checked mode, verifies the type. | 303 // In checked mode, verifies the type. |
268 x2 = m2; | 304 x2 = m2; |
269 x2 = confuse(m2); | 305 x2 = confuse(m2); |
270 } | 306 } |
271 } | 307 } |
272 | 308 |
273 /// void Function(int x0, {Function x}) | 309 /// void Function(int x0, {Function x}) |
274 void testF3() { | 310 void testF3() { |
(...skipping 10 matching lines...) Expand all Loading... |
285 } | 321 } |
286 | 322 |
287 Expect.isTrue(m3 is F3); | 323 Expect.isTrue(m3 is F3); |
288 Expect.isTrue(m3 is void Function(int x0, {Function x})); | 324 Expect.isTrue(m3 is void Function(int x0, {Function x})); |
289 Expect.isTrue(confuse(m3) is F3); | 325 Expect.isTrue(confuse(m3) is F3); |
290 // In checked mode, verifies the type. | 326 // In checked mode, verifies the type. |
291 x3 = m3; | 327 x3 = m3; |
292 l3 = m3; | 328 l3 = m3; |
293 x3 = confuse(m3); | 329 x3 = confuse(m3); |
294 l3 = confuse(m3); | 330 l3 = confuse(m3); |
295 | |
296 } | 331 } |
297 | 332 |
298 /// void Function<A>(int x) | 333 /// void Function<A>(int x) |
299 void testF4() { | 334 void testF4() { |
300 Expect.isTrue(f4 is F4); | 335 Expect.isTrue(f4 is F4); |
301 Expect.isTrue(confuse(f4) is F4); | 336 Expect.isTrue(confuse(f4) is F4); |
302 // In checked mode, verifies the type. | 337 // In checked mode, verifies the type. |
303 void Function<A>(int x) l4; | 338 void Function<A>(int x) l4; |
304 // The static function f4 sets `T` to `int`. | 339 // The static function f4 sets `T` to `int`. |
305 if (!tIsBool) { | 340 if (!tIsBool) { |
306 x4 = f4 as dynamic; | 341 x4 = f4 as dynamic; |
307 l4 = f4 as dynamic; | 342 l4 = f4 as dynamic; |
308 x4 = confuse(f4); | 343 x4 = confuse(f4); |
309 l4 = confuse(f4); | 344 l4 = confuse(f4); |
310 } | 345 } |
311 | 346 |
312 Expect.isTrue(m4 is F4); | 347 Expect.isTrue(m4 is F4); |
313 Expect.isTrue(m4 is void Function<A>(int x)); | 348 Expect.isTrue(m4 is void Function<A>(int x)); |
314 Expect.isTrue(confuse(m4) is F4); | 349 Expect.isTrue(confuse(m4) is F4); |
315 // In checked mode, verifies the type. | 350 // In checked mode, verifies the type. |
316 x4 = m4; | 351 x4 = m4; |
317 l4 = m4; | 352 l4 = m4; |
318 x4 = confuse(m4); | 353 x4 = confuse(m4); |
319 l4 = confuse(m4); | 354 l4 = confuse(m4); |
320 | |
321 } | 355 } |
322 | 356 |
323 /// int Function([List<Function> x]) Function() | 357 /// int Function([List<Function> x]) Function() |
324 void testF5() { | 358 void testF5() { |
325 Expect.isTrue(f5 is F5); | 359 Expect.isTrue(f5 is F5); |
326 Expect.isTrue(confuse(f5) is F5); | 360 Expect.isTrue(confuse(f5) is F5); |
327 // In checked mode, verifies the type. | 361 // In checked mode, verifies the type. |
328 int Function([List<Function> x]) Function() l5; | 362 int Function([List<Function> x]) Function() l5; |
329 // The static function f5 sets `T` to `int`. | 363 // The static function f5 sets `T` to `int`. |
330 if (!tIsBool) { | 364 if (!tIsBool) { |
331 x5 = f5 as dynamic; | 365 x5 = f5 as dynamic; |
332 l5 = f5 as dynamic; | 366 l5 = f5 as dynamic; |
333 x5 = confuse(f5); | 367 x5 = confuse(f5); |
334 l5 = confuse(f5); | 368 l5 = confuse(f5); |
335 } | 369 } |
336 | 370 |
337 Expect.isTrue(m5 is F5); | 371 Expect.isTrue(m5 is F5); |
338 Expect.isTrue(m5 is int Function([List<Function> x]) Function()); | 372 Expect.isTrue(m5 is int Function([List<Function> x]) Function()); |
339 Expect.isTrue(confuse(m5) is F5); | 373 Expect.isTrue(confuse(m5) is F5); |
340 // In checked mode, verifies the type. | 374 // In checked mode, verifies the type. |
341 x5 = m5; | 375 x5 = m5; |
342 l5 = m5; | 376 l5 = m5; |
343 x5 = confuse(m5); | 377 x5 = confuse(m5); |
344 l5 = confuse(m5); | 378 l5 = confuse(m5); |
345 | |
346 } | 379 } |
347 | 380 |
348 /// int Function(List<T> x0) Function() | 381 /// int Function(List<T> x0) Function() |
349 void testF6() { | 382 void testF6() { |
350 Expect.isTrue(f6 is F6); | 383 Expect.isTrue(f6 is F6); |
351 Expect.isTrue(confuse(f6) is F6); | 384 Expect.isTrue(confuse(f6) is F6); |
352 // In checked mode, verifies the type. | 385 // In checked mode, verifies the type. |
353 int Function(List<T> x0) Function() l6; | 386 int Function(List<T> x0) Function() l6; |
354 // The static function f6 sets `T` to `int`. | 387 // The static function f6 sets `T` to `int`. |
355 if (!tIsBool) { | 388 if (!tIsBool) { |
(...skipping 13 matching lines...) Expand all Loading... |
369 l6 = confuse(m6); | 402 l6 = confuse(m6); |
370 if (!tIsBool) { | 403 if (!tIsBool) { |
371 Expect.isTrue(f6 is F6<int>); | 404 Expect.isTrue(f6 is F6<int>); |
372 Expect.isFalse(f6 is F6<bool>); | 405 Expect.isFalse(f6 is F6<bool>); |
373 Expect.isTrue(confuse(f6) is F6<int>); | 406 Expect.isTrue(confuse(f6) is F6<int>); |
374 Expect.isFalse(confuse(f6) is F6<bool>); | 407 Expect.isFalse(confuse(f6) is F6<bool>); |
375 Expect.equals(tIsDynamic, m6 is F6<bool>); | 408 Expect.equals(tIsDynamic, m6 is F6<bool>); |
376 Expect.equals(tIsDynamic, confuse(m6) is F6<bool>); | 409 Expect.equals(tIsDynamic, confuse(m6) is F6<bool>); |
377 } else { | 410 } else { |
378 if (inCheckedMode) { | 411 if (inCheckedMode) { |
379 Expect.throws(() { x6 = (f6 as dynamic); }); | 412 Expect.throws(() { |
380 Expect.throws(() { x6 = confuse(f6); }); | 413 x6 = (f6 as dynamic); |
| 414 }); |
| 415 Expect.throws(() { |
| 416 x6 = confuse(f6); |
| 417 }); |
381 int Function(List<T> x0) Function() l6; | 418 int Function(List<T> x0) Function() l6; |
382 Expect.throws(() { l6 = (f6 as dynamic); }); | 419 Expect.throws(() { |
383 Expect.throws(() { l6 = confuse(f6); }); | 420 l6 = (f6 as dynamic); |
| 421 }); |
| 422 Expect.throws(() { |
| 423 l6 = confuse(f6); |
| 424 }); |
384 } | 425 } |
385 int Function(List<T> x0) Function() l6 = m6; | 426 int Function(List<T> x0) Function() l6 = m6; |
386 // In checked mode, verifies the type. | 427 // In checked mode, verifies the type. |
387 x6 = m6; | 428 x6 = m6; |
388 x6 = confuse(m6); | 429 x6 = confuse(m6); |
389 } | 430 } |
390 } | 431 } |
391 | 432 |
392 /// Function Function(int x1, [Function x2]) Function() | 433 /// Function Function(int x1, [Function x2]) Function() |
393 void testF7() { | 434 void testF7() { |
(...skipping 10 matching lines...) Expand all Loading... |
404 } | 445 } |
405 | 446 |
406 Expect.isTrue(m7 is F7); | 447 Expect.isTrue(m7 is F7); |
407 Expect.isTrue(m7 is Function Function(int x1, [Function x2]) Function()); | 448 Expect.isTrue(m7 is Function Function(int x1, [Function x2]) Function()); |
408 Expect.isTrue(confuse(m7) is F7); | 449 Expect.isTrue(confuse(m7) is F7); |
409 // In checked mode, verifies the type. | 450 // In checked mode, verifies the type. |
410 x7 = m7; | 451 x7 = m7; |
411 l7 = m7; | 452 l7 = m7; |
412 x7 = confuse(m7); | 453 x7 = confuse(m7); |
413 l7 = confuse(m7); | 454 l7 = confuse(m7); |
414 | |
415 } | 455 } |
416 | 456 |
417 /// Function Function(int x0, {core.List<core.int> x}) Function() | 457 /// Function Function(int x0, {core.List<core.int> x}) Function() |
418 void testF8() { | 458 void testF8() { |
419 Expect.isTrue(f8 is F8); | 459 Expect.isTrue(f8 is F8); |
420 Expect.isTrue(confuse(f8) is F8); | 460 Expect.isTrue(confuse(f8) is F8); |
421 // In checked mode, verifies the type. | 461 // In checked mode, verifies the type. |
422 Function Function(int x0, {core.List<core.int> x}) Function() l8; | 462 Function Function(int x0, {core.List<core.int> x}) Function() l8; |
423 // The static function f8 sets `T` to `int`. | 463 // The static function f8 sets `T` to `int`. |
424 if (!tIsBool) { | 464 if (!tIsBool) { |
425 x8 = f8 as dynamic; | 465 x8 = f8 as dynamic; |
426 l8 = f8 as dynamic; | 466 l8 = f8 as dynamic; |
427 x8 = confuse(f8); | 467 x8 = confuse(f8); |
428 l8 = confuse(f8); | 468 l8 = confuse(f8); |
429 } | 469 } |
430 | 470 |
431 Expect.isTrue(m8 is F8); | 471 Expect.isTrue(m8 is F8); |
432 Expect.isTrue(m8 is Function Function(int x0, {core.List<core.int> x}) Funct
ion()); | 472 Expect.isTrue( |
| 473 m8 is Function Function(int x0, {core.List<core.int> x}) Function()); |
433 Expect.isTrue(confuse(m8) is F8); | 474 Expect.isTrue(confuse(m8) is F8); |
434 // In checked mode, verifies the type. | 475 // In checked mode, verifies the type. |
435 x8 = m8; | 476 x8 = m8; |
436 l8 = m8; | 477 l8 = m8; |
437 x8 = confuse(m8); | 478 x8 = confuse(m8); |
438 l8 = confuse(m8); | 479 l8 = confuse(m8); |
439 | |
440 } | 480 } |
441 | 481 |
442 /// List<Function> Function(Function x) Function() | 482 /// List<Function> Function(Function x) Function() |
443 void testF9() { | 483 void testF9() { |
444 Expect.isTrue(f9 is F9); | 484 Expect.isTrue(f9 is F9); |
445 Expect.isTrue(confuse(f9) is F9); | 485 Expect.isTrue(confuse(f9) is F9); |
446 // In checked mode, verifies the type. | 486 // In checked mode, verifies the type. |
447 List<Function> Function(Function x) Function() l9; | 487 List<Function> Function(Function x) Function() l9; |
448 // The static function f9 sets `T` to `int`. | 488 // The static function f9 sets `T` to `int`. |
449 if (!tIsBool) { | 489 if (!tIsBool) { |
450 x9 = f9 as dynamic; | 490 x9 = f9 as dynamic; |
451 l9 = f9 as dynamic; | 491 l9 = f9 as dynamic; |
452 x9 = confuse(f9); | 492 x9 = confuse(f9); |
453 l9 = confuse(f9); | 493 l9 = confuse(f9); |
454 } | 494 } |
455 | 495 |
456 Expect.isTrue(m9 is F9); | 496 Expect.isTrue(m9 is F9); |
457 Expect.isTrue(m9 is List<Function> Function(Function x) Function()); | 497 Expect.isTrue(m9 is List<Function> Function(Function x) Function()); |
458 Expect.isTrue(confuse(m9) is F9); | 498 Expect.isTrue(confuse(m9) is F9); |
459 // In checked mode, verifies the type. | 499 // In checked mode, verifies the type. |
460 x9 = m9; | 500 x9 = m9; |
461 l9 = m9; | 501 l9 = m9; |
462 x9 = confuse(m9); | 502 x9 = confuse(m9); |
463 l9 = confuse(m9); | 503 l9 = confuse(m9); |
464 | |
465 } | 504 } |
466 | 505 |
467 /// List<Function> Function(int y, [core.List<core.int> x]) Function() | 506 /// List<Function> Function(int y, [core.List<core.int> x]) Function() |
468 void testF10() { | 507 void testF10() { |
469 Expect.isTrue(f10 is F10); | 508 Expect.isTrue(f10 is F10); |
470 Expect.isTrue(confuse(f10) is F10); | 509 Expect.isTrue(confuse(f10) is F10); |
471 // In checked mode, verifies the type. | 510 // In checked mode, verifies the type. |
472 List<Function> Function(int y, [core.List<core.int> x]) Function() l10; | 511 List<Function> Function(int y, [core.List<core.int> x]) Function() l10; |
473 // The static function f10 sets `T` to `int`. | 512 // The static function f10 sets `T` to `int`. |
474 if (!tIsBool) { | 513 if (!tIsBool) { |
475 x10 = f10 as dynamic; | 514 x10 = f10 as dynamic; |
476 l10 = f10 as dynamic; | 515 l10 = f10 as dynamic; |
477 x10 = confuse(f10); | 516 x10 = confuse(f10); |
478 l10 = confuse(f10); | 517 l10 = confuse(f10); |
479 } | 518 } |
480 | 519 |
481 Expect.isTrue(m10 is F10); | 520 Expect.isTrue(m10 is F10); |
482 Expect.isTrue(m10 is List<Function> Function(int y, [core.List<core.int> x])
Function()); | 521 Expect.isTrue(m10 is List<Function> Function(int y, |
| 522 [core.List<core.int> x]) Function()); |
483 Expect.isTrue(confuse(m10) is F10); | 523 Expect.isTrue(confuse(m10) is F10); |
484 // In checked mode, verifies the type. | 524 // In checked mode, verifies the type. |
485 x10 = m10; | 525 x10 = m10; |
486 l10 = m10; | 526 l10 = m10; |
487 x10 = confuse(m10); | 527 x10 = confuse(m10); |
488 l10 = confuse(m10); | 528 l10 = confuse(m10); |
489 | |
490 } | 529 } |
491 | 530 |
492 /// core.List<core.int> Function([int x1]) Function() | 531 /// core.List<core.int> Function([int x1]) Function() |
493 void testF11() { | 532 void testF11() { |
494 Expect.isTrue(f11 is F11); | 533 Expect.isTrue(f11 is F11); |
495 Expect.isTrue(confuse(f11) is F11); | 534 Expect.isTrue(confuse(f11) is F11); |
496 // In checked mode, verifies the type. | 535 // In checked mode, verifies the type. |
497 core.List<core.int> Function([int x1]) Function() l11; | 536 core.List<core.int> Function([int x1]) Function() l11; |
498 // The static function f11 sets `T` to `int`. | 537 // The static function f11 sets `T` to `int`. |
499 if (!tIsBool) { | 538 if (!tIsBool) { |
500 x11 = f11 as dynamic; | 539 x11 = f11 as dynamic; |
501 l11 = f11 as dynamic; | 540 l11 = f11 as dynamic; |
502 x11 = confuse(f11); | 541 x11 = confuse(f11); |
503 l11 = confuse(f11); | 542 l11 = confuse(f11); |
504 } | 543 } |
505 | 544 |
506 Expect.isTrue(m11 is F11); | 545 Expect.isTrue(m11 is F11); |
507 Expect.isTrue(m11 is core.List<core.int> Function([int x1]) Function()); | 546 Expect.isTrue(m11 is core.List<core.int> Function([int x1]) Function()); |
508 Expect.isTrue(confuse(m11) is F11); | 547 Expect.isTrue(confuse(m11) is F11); |
509 // In checked mode, verifies the type. | 548 // In checked mode, verifies the type. |
510 x11 = m11; | 549 x11 = m11; |
511 l11 = m11; | 550 l11 = m11; |
512 x11 = confuse(m11); | 551 x11 = confuse(m11); |
513 l11 = confuse(m11); | 552 l11 = confuse(m11); |
514 | |
515 } | 553 } |
516 | 554 |
517 /// core.List<core.int> Function({List<Function> x}) Function() | 555 /// core.List<core.int> Function({List<Function> x}) Function() |
518 void testF12() { | 556 void testF12() { |
519 Expect.isTrue(f12 is F12); | 557 Expect.isTrue(f12 is F12); |
520 Expect.isTrue(confuse(f12) is F12); | 558 Expect.isTrue(confuse(f12) is F12); |
521 // In checked mode, verifies the type. | 559 // In checked mode, verifies the type. |
522 core.List<core.int> Function({List<Function> x}) Function() l12; | 560 core.List<core.int> Function({List<Function> x}) Function() l12; |
523 // The static function f12 sets `T` to `int`. | 561 // The static function f12 sets `T` to `int`. |
524 if (!tIsBool) { | 562 if (!tIsBool) { |
525 x12 = f12 as dynamic; | 563 x12 = f12 as dynamic; |
526 l12 = f12 as dynamic; | 564 l12 = f12 as dynamic; |
527 x12 = confuse(f12); | 565 x12 = confuse(f12); |
528 l12 = confuse(f12); | 566 l12 = confuse(f12); |
529 } | 567 } |
530 | 568 |
531 Expect.isTrue(m12 is F12); | 569 Expect.isTrue(m12 is F12); |
532 Expect.isTrue(m12 is core.List<core.int> Function({List<Function> x}) Functi
on()); | 570 Expect.isTrue( |
| 571 m12 is core.List<core.int> Function({List<Function> x}) Function()); |
533 Expect.isTrue(confuse(m12) is F12); | 572 Expect.isTrue(confuse(m12) is F12); |
534 // In checked mode, verifies the type. | 573 // In checked mode, verifies the type. |
535 x12 = m12; | 574 x12 = m12; |
536 l12 = m12; | 575 l12 = m12; |
537 x12 = confuse(m12); | 576 x12 = confuse(m12); |
538 l12 = confuse(m12); | 577 l12 = confuse(m12); |
539 | |
540 } | 578 } |
541 | 579 |
542 /// core.List<core.int> Function() Function() | 580 /// core.List<core.int> Function() Function() |
543 void testF13() { | 581 void testF13() { |
544 Expect.isTrue(f13 is F13); | 582 Expect.isTrue(f13 is F13); |
545 Expect.isTrue(confuse(f13) is F13); | 583 Expect.isTrue(confuse(f13) is F13); |
546 // In checked mode, verifies the type. | 584 // In checked mode, verifies the type. |
547 core.List<core.int> Function() Function() l13; | 585 core.List<core.int> Function() Function() l13; |
548 // The static function f13 sets `T` to `int`. | 586 // The static function f13 sets `T` to `int`. |
549 if (!tIsBool) { | 587 if (!tIsBool) { |
550 x13 = f13 as dynamic; | 588 x13 = f13 as dynamic; |
551 l13 = f13 as dynamic; | 589 l13 = f13 as dynamic; |
552 x13 = confuse(f13); | 590 x13 = confuse(f13); |
553 l13 = confuse(f13); | 591 l13 = confuse(f13); |
554 } | 592 } |
555 | 593 |
556 Expect.isTrue(m13 is F13); | 594 Expect.isTrue(m13 is F13); |
557 Expect.isTrue(m13 is core.List<core.int> Function() Function()); | 595 Expect.isTrue(m13 is core.List<core.int> Function() Function()); |
558 Expect.isTrue(confuse(m13) is F13); | 596 Expect.isTrue(confuse(m13) is F13); |
559 // In checked mode, verifies the type. | 597 // In checked mode, verifies the type. |
560 x13 = m13; | 598 x13 = m13; |
561 l13 = m13; | 599 l13 = m13; |
562 x13 = confuse(m13); | 600 x13 = confuse(m13); |
563 l13 = confuse(m13); | 601 l13 = confuse(m13); |
564 | |
565 } | 602 } |
566 | 603 |
567 /// List<T> Function(int x0, [List<Function> x]) Function() | 604 /// List<T> Function(int x0, [List<Function> x]) Function() |
568 void testF14() { | 605 void testF14() { |
569 Expect.isTrue(f14 is F14); | 606 Expect.isTrue(f14 is F14); |
570 Expect.isTrue(confuse(f14) is F14); | 607 Expect.isTrue(confuse(f14) is F14); |
571 // In checked mode, verifies the type. | 608 // In checked mode, verifies the type. |
572 List<T> Function(int x0, [List<Function> x]) Function() l14; | 609 List<T> Function(int x0, [List<Function> x]) Function() l14; |
573 // The static function f14 sets `T` to `int`. | 610 // The static function f14 sets `T` to `int`. |
574 if (!tIsBool) { | 611 if (!tIsBool) { |
575 x14 = f14 as dynamic; | 612 x14 = f14 as dynamic; |
576 l14 = f14 as dynamic; | 613 l14 = f14 as dynamic; |
577 x14 = confuse(f14); | 614 x14 = confuse(f14); |
578 l14 = confuse(f14); | 615 l14 = confuse(f14); |
579 } | 616 } |
580 | 617 |
581 Expect.isTrue(m14 is F14); | 618 Expect.isTrue(m14 is F14); |
582 Expect.isTrue(m14 is List<T> Function(int x0, [List<Function> x]) Function()
); | 619 Expect |
| 620 .isTrue(m14 is List<T> Function(int x0, [List<Function> x]) Function()); |
583 Expect.isTrue(confuse(m14) is F14); | 621 Expect.isTrue(confuse(m14) is F14); |
584 // In checked mode, verifies the type. | 622 // In checked mode, verifies the type. |
585 x14 = m14; | 623 x14 = m14; |
586 l14 = m14; | 624 l14 = m14; |
587 x14 = confuse(m14); | 625 x14 = confuse(m14); |
588 l14 = confuse(m14); | 626 l14 = confuse(m14); |
589 if (!tIsBool) { | 627 if (!tIsBool) { |
590 Expect.isTrue(f14 is F14<int>); | 628 Expect.isTrue(f14 is F14<int>); |
591 Expect.isFalse(f14 is F14<bool>); | 629 Expect.isFalse(f14 is F14<bool>); |
592 Expect.isTrue(confuse(f14) is F14<int>); | 630 Expect.isTrue(confuse(f14) is F14<int>); |
593 Expect.isFalse(confuse(f14) is F14<bool>); | 631 Expect.isFalse(confuse(f14) is F14<bool>); |
594 Expect.equals(tIsDynamic, m14 is F14<bool>); | 632 Expect.equals(tIsDynamic, m14 is F14<bool>); |
595 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); | 633 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); |
596 } else { | 634 } else { |
597 if (inCheckedMode) { | 635 if (inCheckedMode) { |
598 Expect.throws(() { x14 = (f14 as dynamic); }); | 636 Expect.throws(() { |
599 Expect.throws(() { x14 = confuse(f14); }); | 637 x14 = (f14 as dynamic); |
| 638 }); |
| 639 Expect.throws(() { |
| 640 x14 = confuse(f14); |
| 641 }); |
600 List<T> Function(int x0, [List<Function> x]) Function() l14; | 642 List<T> Function(int x0, [List<Function> x]) Function() l14; |
601 Expect.throws(() { l14 = (f14 as dynamic); }); | 643 Expect.throws(() { |
602 Expect.throws(() { l14 = confuse(f14); }); | 644 l14 = (f14 as dynamic); |
| 645 }); |
| 646 Expect.throws(() { |
| 647 l14 = confuse(f14); |
| 648 }); |
603 } | 649 } |
604 List<T> Function(int x0, [List<Function> x]) Function() l14 = m14; | 650 List<T> Function(int x0, [List<Function> x]) Function() l14 = m14; |
605 // In checked mode, verifies the type. | 651 // In checked mode, verifies the type. |
606 x14 = m14; | 652 x14 = m14; |
607 x14 = confuse(m14); | 653 x14 = confuse(m14); |
608 } | 654 } |
609 } | 655 } |
610 | 656 |
611 /// List<T> Function([List<T> x1]) Function() | 657 /// List<T> Function([List<T> x1]) Function() |
612 void testF15() { | 658 void testF15() { |
(...skipping 19 matching lines...) Expand all Loading... |
632 l15 = confuse(m15); | 678 l15 = confuse(m15); |
633 if (!tIsBool) { | 679 if (!tIsBool) { |
634 Expect.isTrue(f15 is F15<int>); | 680 Expect.isTrue(f15 is F15<int>); |
635 Expect.isFalse(f15 is F15<bool>); | 681 Expect.isFalse(f15 is F15<bool>); |
636 Expect.isTrue(confuse(f15) is F15<int>); | 682 Expect.isTrue(confuse(f15) is F15<int>); |
637 Expect.isFalse(confuse(f15) is F15<bool>); | 683 Expect.isFalse(confuse(f15) is F15<bool>); |
638 Expect.equals(tIsDynamic, m15 is F15<bool>); | 684 Expect.equals(tIsDynamic, m15 is F15<bool>); |
639 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); | 685 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); |
640 } else { | 686 } else { |
641 if (inCheckedMode) { | 687 if (inCheckedMode) { |
642 Expect.throws(() { x15 = (f15 as dynamic); }); | 688 Expect.throws(() { |
643 Expect.throws(() { x15 = confuse(f15); }); | 689 x15 = (f15 as dynamic); |
| 690 }); |
| 691 Expect.throws(() { |
| 692 x15 = confuse(f15); |
| 693 }); |
644 List<T> Function([List<T> x1]) Function() l15; | 694 List<T> Function([List<T> x1]) Function() l15; |
645 Expect.throws(() { l15 = (f15 as dynamic); }); | 695 Expect.throws(() { |
646 Expect.throws(() { l15 = confuse(f15); }); | 696 l15 = (f15 as dynamic); |
| 697 }); |
| 698 Expect.throws(() { |
| 699 l15 = confuse(f15); |
| 700 }); |
647 } | 701 } |
648 List<T> Function([List<T> x1]) Function() l15 = m15; | 702 List<T> Function([List<T> x1]) Function() l15 = m15; |
649 // In checked mode, verifies the type. | 703 // In checked mode, verifies the type. |
650 x15 = m15; | 704 x15 = m15; |
651 x15 = confuse(m15); | 705 x15 = confuse(m15); |
652 } | 706 } |
653 } | 707 } |
654 | 708 |
655 /// Function(int x, [Function x2]) Function() | 709 /// Function(int x, [Function x2]) Function() |
656 void testF16() { | 710 void testF16() { |
(...skipping 10 matching lines...) Expand all Loading... |
667 } | 721 } |
668 | 722 |
669 Expect.isTrue(m16 is F16); | 723 Expect.isTrue(m16 is F16); |
670 Expect.isTrue(m16 is Function(int x, [Function x2]) Function()); | 724 Expect.isTrue(m16 is Function(int x, [Function x2]) Function()); |
671 Expect.isTrue(confuse(m16) is F16); | 725 Expect.isTrue(confuse(m16) is F16); |
672 // In checked mode, verifies the type. | 726 // In checked mode, verifies the type. |
673 x16 = m16; | 727 x16 = m16; |
674 l16 = m16; | 728 l16 = m16; |
675 x16 = confuse(m16); | 729 x16 = confuse(m16); |
676 l16 = confuse(m16); | 730 l16 = confuse(m16); |
677 | |
678 } | 731 } |
679 | 732 |
680 /// Function(int y, {core.List<core.int> x}) Function() | 733 /// Function(int y, {core.List<core.int> x}) Function() |
681 void testF17() { | 734 void testF17() { |
682 Expect.isTrue(f17 is F17); | 735 Expect.isTrue(f17 is F17); |
683 Expect.isTrue(confuse(f17) is F17); | 736 Expect.isTrue(confuse(f17) is F17); |
684 // In checked mode, verifies the type. | 737 // In checked mode, verifies the type. |
685 Function(int y, {core.List<core.int> x}) Function() l17; | 738 Function(int y, {core.List<core.int> x}) Function() l17; |
686 // The static function f17 sets `T` to `int`. | 739 // The static function f17 sets `T` to `int`. |
687 if (!tIsBool) { | 740 if (!tIsBool) { |
688 x17 = f17 as dynamic; | 741 x17 = f17 as dynamic; |
689 l17 = f17 as dynamic; | 742 l17 = f17 as dynamic; |
690 x17 = confuse(f17); | 743 x17 = confuse(f17); |
691 l17 = confuse(f17); | 744 l17 = confuse(f17); |
692 } | 745 } |
693 | 746 |
694 Expect.isTrue(m17 is F17); | 747 Expect.isTrue(m17 is F17); |
695 Expect.isTrue(m17 is Function(int y, {core.List<core.int> x}) Function()); | 748 Expect.isTrue(m17 is Function(int y, {core.List<core.int> x}) Function()); |
696 Expect.isTrue(confuse(m17) is F17); | 749 Expect.isTrue(confuse(m17) is F17); |
697 // In checked mode, verifies the type. | 750 // In checked mode, verifies the type. |
698 x17 = m17; | 751 x17 = m17; |
699 l17 = m17; | 752 l17 = m17; |
700 x17 = confuse(m17); | 753 x17 = confuse(m17); |
701 l17 = confuse(m17); | 754 l17 = confuse(m17); |
702 | |
703 } | 755 } |
704 | 756 |
705 /// void Function([Function x]) Function() | 757 /// void Function([Function x]) Function() |
706 void testF18() { | 758 void testF18() { |
707 Expect.isTrue(f18 is F18); | 759 Expect.isTrue(f18 is F18); |
708 Expect.isTrue(confuse(f18) is F18); | 760 Expect.isTrue(confuse(f18) is F18); |
709 // In checked mode, verifies the type. | 761 // In checked mode, verifies the type. |
710 void Function([Function x]) Function() l18; | 762 void Function([Function x]) Function() l18; |
711 // The static function f18 sets `T` to `int`. | 763 // The static function f18 sets `T` to `int`. |
712 if (!tIsBool) { | 764 if (!tIsBool) { |
713 x18 = f18 as dynamic; | 765 x18 = f18 as dynamic; |
714 l18 = f18 as dynamic; | 766 l18 = f18 as dynamic; |
715 x18 = confuse(f18); | 767 x18 = confuse(f18); |
716 l18 = confuse(f18); | 768 l18 = confuse(f18); |
717 } | 769 } |
718 | 770 |
719 Expect.isTrue(m18 is F18); | 771 Expect.isTrue(m18 is F18); |
720 Expect.isTrue(m18 is void Function([Function x]) Function()); | 772 Expect.isTrue(m18 is void Function([Function x]) Function()); |
721 Expect.isTrue(confuse(m18) is F18); | 773 Expect.isTrue(confuse(m18) is F18); |
722 // In checked mode, verifies the type. | 774 // In checked mode, verifies the type. |
723 x18 = m18; | 775 x18 = m18; |
724 l18 = m18; | 776 l18 = m18; |
725 x18 = confuse(m18); | 777 x18 = confuse(m18); |
726 l18 = confuse(m18); | 778 l18 = confuse(m18); |
727 | |
728 } | 779 } |
729 | 780 |
730 /// void Function(core.List<core.int> x0) Function() | 781 /// void Function(core.List<core.int> x0) Function() |
731 void testF19() { | 782 void testF19() { |
732 Expect.isTrue(f19 is F19); | 783 Expect.isTrue(f19 is F19); |
733 Expect.isTrue(confuse(f19) is F19); | 784 Expect.isTrue(confuse(f19) is F19); |
734 // In checked mode, verifies the type. | 785 // In checked mode, verifies the type. |
735 void Function(core.List<core.int> x0) Function() l19; | 786 void Function(core.List<core.int> x0) Function() l19; |
736 // The static function f19 sets `T` to `int`. | 787 // The static function f19 sets `T` to `int`. |
737 if (!tIsBool) { | 788 if (!tIsBool) { |
738 x19 = f19 as dynamic; | 789 x19 = f19 as dynamic; |
739 l19 = f19 as dynamic; | 790 l19 = f19 as dynamic; |
740 x19 = confuse(f19); | 791 x19 = confuse(f19); |
741 l19 = confuse(f19); | 792 l19 = confuse(f19); |
742 } | 793 } |
743 | 794 |
744 Expect.isTrue(m19 is F19); | 795 Expect.isTrue(m19 is F19); |
745 Expect.isTrue(m19 is void Function(core.List<core.int> x0) Function()); | 796 Expect.isTrue(m19 is void Function(core.List<core.int> x0) Function()); |
746 Expect.isTrue(confuse(m19) is F19); | 797 Expect.isTrue(confuse(m19) is F19); |
747 // In checked mode, verifies the type. | 798 // In checked mode, verifies the type. |
748 x19 = m19; | 799 x19 = m19; |
749 l19 = m19; | 800 l19 = m19; |
750 x19 = confuse(m19); | 801 x19 = confuse(m19); |
751 l19 = confuse(m19); | 802 l19 = confuse(m19); |
752 | |
753 } | 803 } |
754 | 804 |
755 /// int Function<A>(A x) Function() | 805 /// int Function<A>(A x) Function() |
756 void testF20() { | 806 void testF20() { |
757 Expect.isTrue(f20 is F20); | 807 Expect.isTrue(f20 is F20); |
758 Expect.isTrue(confuse(f20) is F20); | 808 Expect.isTrue(confuse(f20) is F20); |
759 // In checked mode, verifies the type. | 809 // In checked mode, verifies the type. |
760 int Function<A>(A x) Function() l20; | 810 int Function<A>(A x) Function() l20; |
761 // The static function f20 sets `T` to `int`. | 811 // The static function f20 sets `T` to `int`. |
762 if (!tIsBool) { | 812 if (!tIsBool) { |
763 x20 = f20 as dynamic; | 813 x20 = f20 as dynamic; |
764 l20 = f20 as dynamic; | 814 l20 = f20 as dynamic; |
765 x20 = confuse(f20); | 815 x20 = confuse(f20); |
766 l20 = confuse(f20); | 816 l20 = confuse(f20); |
767 } | 817 } |
768 | 818 |
769 Expect.isTrue(m20 is F20); | 819 Expect.isTrue(m20 is F20); |
770 Expect.isTrue(m20 is int Function<A>(A x) Function()); | 820 Expect.isTrue(m20 is int Function<A>(A x) Function()); |
771 Expect.isTrue(confuse(m20) is F20); | 821 Expect.isTrue(confuse(m20) is F20); |
772 // In checked mode, verifies the type. | 822 // In checked mode, verifies the type. |
773 x20 = m20; | 823 x20 = m20; |
774 l20 = m20; | 824 l20 = m20; |
775 x20 = confuse(m20); | 825 x20 = confuse(m20); |
776 l20 = confuse(m20); | 826 l20 = confuse(m20); |
777 | |
778 } | 827 } |
779 | 828 |
780 /// core.List<core.int> Function<A>(List<A> x) Function() | 829 /// core.List<core.int> Function<A>(List<A> x) Function() |
781 void testF21() { | 830 void testF21() { |
782 Expect.isTrue(f21 is F21); | 831 Expect.isTrue(f21 is F21); |
783 Expect.isTrue(confuse(f21) is F21); | 832 Expect.isTrue(confuse(f21) is F21); |
784 // In checked mode, verifies the type. | 833 // In checked mode, verifies the type. |
785 core.List<core.int> Function<A>(List<A> x) Function() l21; | 834 core.List<core.int> Function<A>(List<A> x) Function() l21; |
786 // The static function f21 sets `T` to `int`. | 835 // The static function f21 sets `T` to `int`. |
787 if (!tIsBool) { | 836 if (!tIsBool) { |
788 x21 = f21 as dynamic; | 837 x21 = f21 as dynamic; |
789 l21 = f21 as dynamic; | 838 l21 = f21 as dynamic; |
790 x21 = confuse(f21); | 839 x21 = confuse(f21); |
791 l21 = confuse(f21); | 840 l21 = confuse(f21); |
792 } | 841 } |
793 | 842 |
794 Expect.isTrue(m21 is F21); | 843 Expect.isTrue(m21 is F21); |
795 Expect.isTrue(m21 is core.List<core.int> Function<A>(List<A> x) Function()); | 844 Expect.isTrue(m21 is core.List<core.int> Function<A>(List<A> x) Function()); |
796 Expect.isTrue(confuse(m21) is F21); | 845 Expect.isTrue(confuse(m21) is F21); |
797 // In checked mode, verifies the type. | 846 // In checked mode, verifies the type. |
798 x21 = m21; | 847 x21 = m21; |
799 l21 = m21; | 848 l21 = m21; |
800 x21 = confuse(m21); | 849 x21 = confuse(m21); |
801 l21 = confuse(m21); | 850 l21 = confuse(m21); |
802 | |
803 } | 851 } |
804 | 852 |
805 /// List<A> Function<A>(int x) Function() | 853 /// List<A> Function<A>(int x) Function() |
806 void testF22() { | 854 void testF22() { |
807 Expect.isTrue(f22 is F22); | 855 Expect.isTrue(f22 is F22); |
808 Expect.isTrue(confuse(f22) is F22); | 856 Expect.isTrue(confuse(f22) is F22); |
809 // In checked mode, verifies the type. | 857 // In checked mode, verifies the type. |
810 List<A> Function<A>(int x) Function() l22; | 858 List<A> Function<A>(int x) Function() l22; |
811 // The static function f22 sets `T` to `int`. | 859 // The static function f22 sets `T` to `int`. |
812 if (!tIsBool) { | 860 if (!tIsBool) { |
813 x22 = f22 as dynamic; | 861 x22 = f22 as dynamic; |
814 l22 = f22 as dynamic; | 862 l22 = f22 as dynamic; |
815 x22 = confuse(f22); | 863 x22 = confuse(f22); |
816 l22 = confuse(f22); | 864 l22 = confuse(f22); |
817 } | 865 } |
818 | 866 |
819 Expect.isTrue(m22 is F22); | 867 Expect.isTrue(m22 is F22); |
820 Expect.isTrue(m22 is List<A> Function<A>(int x) Function()); | 868 Expect.isTrue(m22 is List<A> Function<A>(int x) Function()); |
821 Expect.isTrue(confuse(m22) is F22); | 869 Expect.isTrue(confuse(m22) is F22); |
822 // In checked mode, verifies the type. | 870 // In checked mode, verifies the type. |
823 x22 = m22; | 871 x22 = m22; |
824 l22 = m22; | 872 l22 = m22; |
825 x22 = confuse(m22); | 873 x22 = confuse(m22); |
826 l22 = confuse(m22); | 874 l22 = confuse(m22); |
827 | |
828 } | 875 } |
829 | |
830 | |
831 } | 876 } |
832 | 877 |
833 void main() { | 878 void main() { |
834 new U56().runTests(); | 879 new U56().runTests(); |
835 new U56<int>(tIsInt: true).runTests(); | 880 new U56<int>(tIsInt: true).runTests(); |
836 new U56<bool>(tIsBool: true).runTests(); | 881 new U56<bool>(tIsBool: true).runTests(); |
837 } | 882 } |
838 | |
OLD | NEW |