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