Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: tests/language/function_type/function_type32_test.dart

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

Powered by Google App Engine
This is Rietveld 408576698