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