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

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

Powered by Google App Engine
This is Rietveld 408576698