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