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