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