| 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 x}); | 29 = int Function({Function x}); |
| 27 typedef F1<T> = List<Function> Function(int x, [int x2]); | 30 typedef F1<T> |
| 28 typedef F2<T> = core.List<core.int> Function(int x, [List<T> x2]); | 31 = List<Function> Function(int x, [int x2]); |
| 29 typedef F3<T> = Function(int x1, [core.List<core.int> x2]); | 32 typedef F2<T> |
| 30 typedef F4<T> = core.List<core.int> Function<A>(core.List<core.int> x); | 33 = core.List<core.int> Function(int x, [List<T> x2]); |
| 31 typedef F5<T> = int Function(int x1, [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.i
nt>(int x); | 35 = Function(int x1, [core.List<core.int> x2]); |
| 33 typedef F7<T> = Function Function(int x, [int x1]) Function<B extends core.int>(
int x); | 36 typedef F4<T> |
| 34 typedef F8<T> = Function Function(int y, {List<Function> x}) Function<B extends
core.int>(int x); | 37 = core.List<core.int> Function<A>(core.List<core.int> x); |
| 35 typedef F9<T> = List<Function> Function([int x]) Function<B extends core.int>(in
t x); | 38 typedef F5<T> |
| 36 typedef F10<T> = List<Function> Function(List<Function> x1) Function<B extends c
ore.int>(int x); | 39 = int Function(int x1, [Function x]) Function<B extends core.int>(int x); |
| 37 typedef F11<T> = List<Function> Function(int x, [List<T> x1]) Function<B extends
core.int>(int x); | 40 typedef F6<T> |
| 38 typedef F12<T> = core.List<core.int> Function(int x1, {Function x}) Function<B e
xtends core.int>(int x); | 41 = int Function([core.List<core.int> x1]) Function<B extends core.int>( |
| 39 typedef F13<T> = core.List<core.int> Function([List<T> x]) Function<B extends co
re.int>(int x); | 42 int x); |
| 40 typedef F14<T> = List<T> Function(int y, [Function x]) Function<B extends core.i
nt>(int x); | 43 typedef F7<T> |
| 41 typedef F15<T> = List<T> Function(int x2, [core.List<core.int> x3]) Function<B e
xtends core.int>(int x); | 44 = Function Function(int x, [int x1]) Function<B extends core.int>(int x); |
| 42 typedef F16<T> = Function({int x}) Function<B extends core.int>(int x); | 45 typedef F8<T> |
| 43 typedef F17<T> = Function(core.List<core.int> x) Function<B extends core.int>(in
t x); | 46 = Function Function(int y, {List<Function> x}) Function<B extends core.int>( |
| 44 typedef F18<T> = void Function(int x1, [int x]) Function<B extends core.int>(int
x); | 47 int x); |
| 45 typedef F19<T> = void Function([List<Function> x1]) Function<B extends core.int>
(int x); | 48 typedef F9<T> |
| 46 typedef F20<T> = void Function({List<T> x}) Function<B extends core.int>(int x); | 49 = List<Function> Function([int x]) Function<B extends core.int>(int x); |
| 47 typedef F21<T> = List<Function> Function<A>() Function<B extends core.int>(int x
); | 50 typedef F10<T> |
| 48 typedef F22<T> = Function<A>(A x) Function<B extends core.int>(int x); | 51 = List<Function> Function(List<Function> x1) Function<B extends core.int>( |
| 49 typedef F23<T> = void Function<A>(List<A> x) Function<B extends core.int>(int x)
; | 52 int x); |
| 50 | 53 typedef F11<T> |
| 54 = List<Function> Function(int x, [List<T> x1]) Function<B extends core.int>( |
| 55 int x); |
| 56 typedef F12<T> |
| 57 = core.List<core.int> Function(int x1, |
| 58 {Function x}) Function<B extends core.int>(int x); |
| 59 typedef F13<T> |
| 60 = core.List<core.int> Function([List<T> x]) Function<B extends core.int>( |
| 61 int x); |
| 62 typedef F14<T> |
| 63 = List<T> Function(int y, [Function x]) Function<B extends core.int>(int x); |
| 64 typedef F15<T> |
| 65 = List<T> Function(int x2, |
| 66 [core.List<core.int> x3]) Function<B extends core.int>(int x); |
| 67 typedef F16<T> |
| 68 = Function({int x}) Function<B extends core.int>(int x); |
| 69 typedef F17<T> |
| 70 = Function(core.List<core.int> x) Function<B extends core.int>(int x); |
| 71 typedef F18<T> |
| 72 = void Function(int x1, [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({List<T> x}) Function<B extends core.int>(int x); |
| 77 typedef F21<T> |
| 78 = List<Function> Function<A>() Function<B extends core.int>(int x); |
| 79 typedef F22<T> |
| 80 = Function<A>(A x) Function<B extends core.int>(int x); |
| 81 typedef F23<T> |
| 82 = void Function<A>(List<A> x) Function<B extends core.int>(int x); |
| 51 | 83 |
| 52 int f0({Function x}) => null; | 84 int f0({Function x}) => null; |
| 53 List<Function> f1(int x, [int x0]) => null; | 85 List<Function> f1(int x, [int x0]) => null; |
| 54 core.List<core.int> f2(int x, [List<int> x0]) => null; | 86 core.List<core.int> f2(int x, [List<int> x0]) => null; |
| 55 f3(int x0, [core.List<core.int> x1]) => null; | 87 f3(int x0, [core.List<core.int> x1]) => null; |
| 56 core.List<core.int> f4<A>(core.List<core.int> x) => null; | 88 core.List<core.int> f4<A>(core.List<core.int> x) => null; |
| 57 int Function(int x0, [Function x]) f5<B extends core.int>(int x) => null; | 89 int Function(int x0, [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 x, [int x0]) f7<B extends core.int>(int x) => null; | 91 Function Function(int x, [int x0]) f7<B extends core.int>(int x) => null; |
| 60 Function Function(int y, {List<Function> x}) f8<B extends core.int>(int x) => nu
ll; | 92 Function Function(int y, {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(List<Function> x0) f10<B extends core.int>(int x) => nul
l; | 95 List<Function> Function(List<Function> x0) f10<B extends core.int>(int x) => |
| 63 List<Function> Function(int x, [List<int> x0]) f11<B extends core.int>(int x) =>
null; | 96 null; |
| 64 core.List<core.int> Function(int x0, {Function x}) f12<B extends core.int>(int x
) => null; | 97 List<Function> Function(int x, [List<int> x0]) f11<B extends core.int>(int x) => |
| 65 core.List<core.int> Function([List<int> x]) f13<B extends core.int>(int x) => nu
ll; | 98 null; |
| 99 core.List<core.int> Function(int x0, {Function x}) f12<B extends core.int>( |
| 100 int x) => |
| 101 null; |
| 102 core.List<core.int> Function([List<int> x]) f13<B extends core.int>(int x) => |
| 103 null; |
| 66 List<int> Function(int y, [Function x]) f14<B extends core.int>(int x) => null; | 104 List<int> Function(int y, [Function x]) f14<B extends core.int>(int x) => null; |
| 67 List<int> Function(int x0, [core.List<core.int> x1]) f15<B extends core.int>(int
x) => null; | 105 List<int> Function(int x0, [core.List<core.int> x1]) f15<B extends core.int>( |
| 106 int x) => |
| 107 null; |
| 68 Function({int x}) f16<B extends core.int>(int x) => null; | 108 Function({int x}) f16<B extends core.int>(int x) => null; |
| 69 Function(core.List<core.int> x) f17<B extends core.int>(int x) => null; | 109 Function(core.List<core.int> x) f17<B extends core.int>(int x) => null; |
| 70 void Function(int x0, [int x]) f18<B extends core.int>(int x) => null; | 110 void Function(int x0, [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({List<int> x}) f20<B extends core.int>(int x) => null; | 112 void Function({List<int> x}) f20<B extends core.int>(int x) => null; |
| 73 List<Function> Function<A>() f21<B extends core.int>(int x) => null; | 113 List<Function> Function<A>() f21<B extends core.int>(int x) => null; |
| 74 Function<A>(A x) f22<B extends core.int>(int x) => null; | 114 Function<A>(A x) f22<B extends core.int>(int x) => null; |
| 75 void Function<A>(List<A> x) f23<B extends core.int>(int x) => null; | 115 void Function<A>(List<A> x) f23<B extends core.int>(int x) => null; |
| 76 | 116 |
| 77 | |
| 78 class U19<T> { | 117 class U19<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 x}) x0; | 122 int Function({Function x}) x0; |
| 84 List<Function> Function(int x, [int x2]) x1; | 123 List<Function> Function(int x, [int x2]) x1; |
| 85 core.List<core.int> Function(int x, [List<T> x2]) x2; | 124 core.List<core.int> Function(int x, [List<T> x2]) x2; |
| 86 Function(int x1, [core.List<core.int> x2]) x3; | 125 Function(int x1, [core.List<core.int> x2]) x3; |
| 87 core.List<core.int> Function<A>(core.List<core.int> x) x4; | 126 core.List<core.int> Function<A>(core.List<core.int> x) x4; |
| 88 int Function(int x1, [Function x]) Function<B extends core.int>(int x) x5; | 127 int Function(int x1, [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 x, [int x1]) Function<B extends core.int>(int x) x7; | 129 Function Function(int x, [int x1]) Function<B extends core.int>(int x) x7; |
| 91 Function Function(int y, {List<Function> x}) Function<B extends core.int>(int
x) x8; | 130 Function Function(int y, {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(List<Function> x1) Function<B extends core.int>(int x)
x10; | 133 List<Function> Function(List<Function> x1) Function<B extends core.int>(int x) |
| 94 List<Function> Function(int x, [List<T> x1]) Function<B extends core.int>(int
x) x11; | 134 x10; |
| 95 core.List<core.int> Function(int x1, {Function x}) Function<B extends core.int
>(int x) x12; | 135 List<Function> Function(int x, [List<T> x1]) Function<B extends core.int>( |
| 96 core.List<core.int> Function([List<T> x]) Function<B extends core.int>(int x)
x13; | 136 int x) x11; |
| 137 core.List<core.int> Function(int x1, |
| 138 {Function x}) Function<B extends core.int>(int x) x12; |
| 139 core.List<core.int> Function([List<T> x]) Function<B extends core.int>(int x) |
| 140 x13; |
| 97 List<T> Function(int y, [Function x]) Function<B extends core.int>(int x) x14; | 141 List<T> Function(int y, [Function x]) Function<B extends core.int>(int x) x14; |
| 98 List<T> Function(int x2, [core.List<core.int> x3]) Function<B extends core.int
>(int x) x15; | 142 List<T> Function(int x2, |
| 143 [core.List<core.int> x3]) Function<B extends core.int>(int x) x15; |
| 99 Function({int x}) Function<B extends core.int>(int x) x16; | 144 Function({int x}) Function<B extends core.int>(int x) x16; |
| 100 Function(core.List<core.int> x) Function<B extends core.int>(int x) x17; | 145 Function(core.List<core.int> x) Function<B extends core.int>(int x) x17; |
| 101 void Function(int x1, [int x]) Function<B extends core.int>(int x) x18; | 146 void Function(int x1, [int x]) Function<B extends core.int>(int x) x18; |
| 102 void Function([List<Function> x1]) Function<B extends core.int>(int x) x19; | 147 void Function([List<Function> x1]) Function<B extends core.int>(int x) x19; |
| 103 void Function({List<T> x}) Function<B extends core.int>(int x) x20; | 148 void Function({List<T> x}) Function<B extends core.int>(int x) x20; |
| 104 List<Function> Function<A>() Function<B extends core.int>(int x) x21; | 149 List<Function> Function<A>() Function<B extends core.int>(int x) x21; |
| 105 Function<A>(A x) Function<B extends core.int>(int x) x22; | 150 Function<A>(A x) Function<B extends core.int>(int x) x22; |
| 106 void Function<A>(List<A> x) Function<B extends core.int>(int x) x23; | 151 void Function<A>(List<A> x) Function<B extends core.int>(int x) x23; |
| 107 | 152 |
| 108 | |
| 109 U19({this.tIsBool: false, this.tIsInt: false}) | 153 U19({this.tIsBool: false, this.tIsInt: false}) |
| 110 : tIsDynamic = !tIsBool && !tIsInt; | 154 : tIsDynamic = !tIsBool && !tIsInt; |
| 111 | 155 |
| 112 int m0({Function x}) => null; | 156 int m0({Function x}) => null; |
| 113 List<Function> m1(int x, [int x0]) => null; | 157 List<Function> m1(int x, [int x0]) => null; |
| 114 core.List<core.int> m2(int x, [List<T> x0]) => null; | 158 core.List<core.int> m2(int x, [List<T> x0]) => null; |
| 115 m3(int x0, [core.List<core.int> x1]) => null; | 159 m3(int x0, [core.List<core.int> x1]) => null; |
| 116 core.List<core.int> m4<A>(core.List<core.int> x) => null; | 160 core.List<core.int> m4<A>(core.List<core.int> x) => null; |
| 117 int Function(int x0, [Function x]) m5<B extends core.int>(int x) => null; | 161 int Function(int x0, [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; | 162 int Function([core.List<core.int> x0]) m6<B extends core.int>(int x) => null; |
| 119 Function Function(int x, [int x0]) m7<B extends core.int>(int x) => null; | 163 Function Function(int x, [int x0]) m7<B extends core.int>(int x) => null; |
| 120 Function Function(int y, {List<Function> x}) m8<B extends core.int>(int x) =>
null; | 164 Function Function(int y, {List<Function> x}) m8<B extends core.int>(int x) => |
| 165 null; |
| 121 List<Function> Function([int x]) m9<B extends core.int>(int x) => null; | 166 List<Function> Function([int x]) m9<B extends core.int>(int x) => null; |
| 122 List<Function> Function(List<Function> x0) m10<B extends core.int>(int x) => n
ull; | 167 List<Function> Function(List<Function> x0) m10<B extends core.int>(int x) => |
| 123 List<Function> Function(int x, [List<T> x0]) m11<B extends core.int>(int x) =>
null; | 168 null; |
| 124 core.List<core.int> Function(int x0, {Function x}) m12<B extends core.int>(int
x) => null; | 169 List<Function> Function(int x, [List<T> x0]) m11<B extends core.int>(int x) => |
| 125 core.List<core.int> Function([List<T> x]) m13<B extends core.int>(int x) => nu
ll; | 170 null; |
| 171 core.List<core.int> Function(int x0, {Function x}) m12<B extends core.int>( |
| 172 int x) => |
| 173 null; |
| 174 core.List<core.int> Function([List<T> x]) m13<B extends core.int>(int x) => |
| 175 null; |
| 126 List<T> Function(int y, [Function x]) m14<B extends core.int>(int x) => null; | 176 List<T> Function(int y, [Function x]) m14<B extends core.int>(int x) => null; |
| 127 List<T> Function(int x0, [core.List<core.int> x1]) m15<B extends core.int>(int
x) => null; | 177 List<T> Function(int x0, [core.List<core.int> x1]) m15<B extends core.int>( |
| 178 int x) => |
| 179 null; |
| 128 Function({int x}) m16<B extends core.int>(int x) => null; | 180 Function({int x}) m16<B extends core.int>(int x) => null; |
| 129 Function(core.List<core.int> x) m17<B extends core.int>(int x) => null; | 181 Function(core.List<core.int> x) m17<B extends core.int>(int x) => null; |
| 130 void Function(int x0, [int x]) m18<B extends core.int>(int x) => null; | 182 void Function(int x0, [int x]) m18<B extends core.int>(int x) => null; |
| 131 void Function([List<Function> x0]) m19<B extends core.int>(int x) => null; | 183 void Function([List<Function> x0]) m19<B extends core.int>(int x) => null; |
| 132 void Function({List<T> x}) m20<B extends core.int>(int x) => null; | 184 void Function({List<T> x}) m20<B extends core.int>(int x) => null; |
| 133 List<Function> Function<A>() m21<B extends core.int>(int x) => null; | 185 List<Function> Function<A>() m21<B extends core.int>(int x) => null; |
| 134 Function<A>(A x) m22<B extends core.int>(int x) => null; | 186 Function<A>(A x) m22<B extends core.int>(int x) => null; |
| 135 void Function<A>(List<A> x) m23<B extends core.int>(int x) => null; | 187 void Function<A>(List<A> x) m23<B extends core.int>(int x) => null; |
| 136 | 188 |
| 137 | |
| 138 runTests() { | 189 runTests() { |
| 139 testF0(); | 190 testF0(); |
| 140 testF1(); | 191 testF1(); |
| 141 testF2(); | 192 testF2(); |
| 142 testF3(); | 193 testF3(); |
| 143 testF4(); | 194 testF4(); |
| 144 testF5(); | 195 testF5(); |
| 145 testF6(); | 196 testF6(); |
| 146 testF7(); | 197 testF7(); |
| 147 testF8(); | 198 testF8(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 177 } | 228 } |
| 178 | 229 |
| 179 Expect.isTrue(m0 is F0); | 230 Expect.isTrue(m0 is F0); |
| 180 Expect.isTrue(m0 is int Function({Function x})); | 231 Expect.isTrue(m0 is int Function({Function x})); |
| 181 Expect.isTrue(confuse(m0) is F0); | 232 Expect.isTrue(confuse(m0) is F0); |
| 182 // In checked mode, verifies the type. | 233 // In checked mode, verifies the type. |
| 183 x0 = m0; | 234 x0 = m0; |
| 184 l0 = m0; | 235 l0 = m0; |
| 185 x0 = confuse(m0); | 236 x0 = confuse(m0); |
| 186 l0 = confuse(m0); | 237 l0 = confuse(m0); |
| 187 | |
| 188 } | 238 } |
| 189 | 239 |
| 190 /// List<Function> Function(int x, [int x2]) | 240 /// List<Function> Function(int x, [int x2]) |
| 191 void testF1() { | 241 void testF1() { |
| 192 Expect.isTrue(f1 is F1); | 242 Expect.isTrue(f1 is F1); |
| 193 Expect.isTrue(confuse(f1) is F1); | 243 Expect.isTrue(confuse(f1) is F1); |
| 194 // In checked mode, verifies the type. | 244 // In checked mode, verifies the type. |
| 195 List<Function> Function(int x, [int x2]) l1; | 245 List<Function> Function(int x, [int x2]) l1; |
| 196 // The static function f1 sets `T` to `int`. | 246 // The static function f1 sets `T` to `int`. |
| 197 if (!tIsBool) { | 247 if (!tIsBool) { |
| 198 x1 = f1 as dynamic; | 248 x1 = f1 as dynamic; |
| 199 l1 = f1 as dynamic; | 249 l1 = f1 as dynamic; |
| 200 x1 = confuse(f1); | 250 x1 = confuse(f1); |
| 201 l1 = confuse(f1); | 251 l1 = confuse(f1); |
| 202 } | 252 } |
| 203 | 253 |
| 204 Expect.isTrue(m1 is F1); | 254 Expect.isTrue(m1 is F1); |
| 205 Expect.isTrue(m1 is List<Function> Function(int x, [int x2])); | 255 Expect.isTrue(m1 is List<Function> Function(int x, [int x2])); |
| 206 Expect.isTrue(confuse(m1) is F1); | 256 Expect.isTrue(confuse(m1) is F1); |
| 207 // In checked mode, verifies the type. | 257 // In checked mode, verifies the type. |
| 208 x1 = m1; | 258 x1 = m1; |
| 209 l1 = m1; | 259 l1 = m1; |
| 210 x1 = confuse(m1); | 260 x1 = confuse(m1); |
| 211 l1 = confuse(m1); | 261 l1 = confuse(m1); |
| 212 | |
| 213 } | 262 } |
| 214 | 263 |
| 215 /// core.List<core.int> Function(int x, [List<T> x2]) | 264 /// core.List<core.int> Function(int x, [List<T> x2]) |
| 216 void testF2() { | 265 void testF2() { |
| 217 Expect.isTrue(f2 is F2); | 266 Expect.isTrue(f2 is F2); |
| 218 Expect.isTrue(confuse(f2) is F2); | 267 Expect.isTrue(confuse(f2) is F2); |
| 219 // In checked mode, verifies the type. | 268 // In checked mode, verifies the type. |
| 220 core.List<core.int> Function(int x, [List<T> x2]) l2; | 269 core.List<core.int> Function(int x, [List<T> x2]) l2; |
| 221 // The static function f2 sets `T` to `int`. | 270 // The static function f2 sets `T` to `int`. |
| 222 if (!tIsBool) { | 271 if (!tIsBool) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 236 l2 = confuse(m2); | 285 l2 = confuse(m2); |
| 237 if (!tIsBool) { | 286 if (!tIsBool) { |
| 238 Expect.isTrue(f2 is F2<int>); | 287 Expect.isTrue(f2 is F2<int>); |
| 239 Expect.isFalse(f2 is F2<bool>); | 288 Expect.isFalse(f2 is F2<bool>); |
| 240 Expect.isTrue(confuse(f2) is F2<int>); | 289 Expect.isTrue(confuse(f2) is F2<int>); |
| 241 Expect.isFalse(confuse(f2) is F2<bool>); | 290 Expect.isFalse(confuse(f2) is F2<bool>); |
| 242 Expect.equals(tIsDynamic, m2 is F2<bool>); | 291 Expect.equals(tIsDynamic, m2 is F2<bool>); |
| 243 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); | 292 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); |
| 244 } else { | 293 } else { |
| 245 if (inCheckedMode) { | 294 if (inCheckedMode) { |
| 246 Expect.throws(() { x2 = (f2 as dynamic); }); | 295 Expect.throws(() { |
| 247 Expect.throws(() { x2 = confuse(f2); }); | 296 x2 = (f2 as dynamic); |
| 297 }); |
| 298 Expect.throws(() { |
| 299 x2 = confuse(f2); |
| 300 }); |
| 248 core.List<core.int> Function(int x, [List<T> x2]) l2; | 301 core.List<core.int> Function(int x, [List<T> x2]) l2; |
| 249 Expect.throws(() { l2 = (f2 as dynamic); }); | 302 Expect.throws(() { |
| 250 Expect.throws(() { l2 = confuse(f2); }); | 303 l2 = (f2 as dynamic); |
| 304 }); |
| 305 Expect.throws(() { |
| 306 l2 = confuse(f2); |
| 307 }); |
| 251 } | 308 } |
| 252 core.List<core.int> Function(int x, [List<T> x2]) l2 = m2; | 309 core.List<core.int> Function(int x, [List<T> x2]) l2 = m2; |
| 253 // In checked mode, verifies the type. | 310 // In checked mode, verifies the type. |
| 254 x2 = m2; | 311 x2 = m2; |
| 255 x2 = confuse(m2); | 312 x2 = confuse(m2); |
| 256 } | 313 } |
| 257 } | 314 } |
| 258 | 315 |
| 259 /// Function(int x1, [core.List<core.int> x2]) | 316 /// Function(int x1, [core.List<core.int> x2]) |
| 260 void testF3() { | 317 void testF3() { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 271 } | 328 } |
| 272 | 329 |
| 273 Expect.isTrue(m3 is F3); | 330 Expect.isTrue(m3 is F3); |
| 274 Expect.isTrue(m3 is Function(int x1, [core.List<core.int> x2])); | 331 Expect.isTrue(m3 is Function(int x1, [core.List<core.int> x2])); |
| 275 Expect.isTrue(confuse(m3) is F3); | 332 Expect.isTrue(confuse(m3) is F3); |
| 276 // In checked mode, verifies the type. | 333 // In checked mode, verifies the type. |
| 277 x3 = m3; | 334 x3 = m3; |
| 278 l3 = m3; | 335 l3 = m3; |
| 279 x3 = confuse(m3); | 336 x3 = confuse(m3); |
| 280 l3 = confuse(m3); | 337 l3 = confuse(m3); |
| 281 | |
| 282 } | 338 } |
| 283 | 339 |
| 284 /// core.List<core.int> Function<A>(core.List<core.int> x) | 340 /// core.List<core.int> Function<A>(core.List<core.int> x) |
| 285 void testF4() { | 341 void testF4() { |
| 286 Expect.isTrue(f4 is F4); | 342 Expect.isTrue(f4 is F4); |
| 287 Expect.isTrue(confuse(f4) is F4); | 343 Expect.isTrue(confuse(f4) is F4); |
| 288 // In checked mode, verifies the type. | 344 // In checked mode, verifies the type. |
| 289 core.List<core.int> Function<A>(core.List<core.int> x) l4; | 345 core.List<core.int> Function<A>(core.List<core.int> x) l4; |
| 290 // The static function f4 sets `T` to `int`. | 346 // The static function f4 sets `T` to `int`. |
| 291 if (!tIsBool) { | 347 if (!tIsBool) { |
| 292 x4 = f4 as dynamic; | 348 x4 = f4 as dynamic; |
| 293 l4 = f4 as dynamic; | 349 l4 = f4 as dynamic; |
| 294 x4 = confuse(f4); | 350 x4 = confuse(f4); |
| 295 l4 = confuse(f4); | 351 l4 = confuse(f4); |
| 296 } | 352 } |
| 297 | 353 |
| 298 Expect.isTrue(m4 is F4); | 354 Expect.isTrue(m4 is F4); |
| 299 Expect.isTrue(m4 is core.List<core.int> Function<A>(core.List<core.int> x)); | 355 Expect.isTrue(m4 is core.List<core.int> Function<A>(core.List<core.int> x)); |
| 300 Expect.isTrue(confuse(m4) is F4); | 356 Expect.isTrue(confuse(m4) is F4); |
| 301 // In checked mode, verifies the type. | 357 // In checked mode, verifies the type. |
| 302 x4 = m4; | 358 x4 = m4; |
| 303 l4 = m4; | 359 l4 = m4; |
| 304 x4 = confuse(m4); | 360 x4 = confuse(m4); |
| 305 l4 = confuse(m4); | 361 l4 = confuse(m4); |
| 306 | |
| 307 } | 362 } |
| 308 | 363 |
| 309 /// int Function(int x1, [Function x]) Function<B extends core.int>(int x) | 364 /// int Function(int x1, [Function x]) Function<B extends core.int>(int x) |
| 310 void testF5() { | 365 void testF5() { |
| 311 Expect.isTrue(f5 is F5); | 366 Expect.isTrue(f5 is F5); |
| 312 Expect.isTrue(confuse(f5) is F5); | 367 Expect.isTrue(confuse(f5) is F5); |
| 313 // In checked mode, verifies the type. | 368 // In checked mode, verifies the type. |
| 314 int Function(int x1, [Function x]) Function<B extends core.int>(int x) l5; | 369 int Function(int x1, [Function x]) Function<B extends core.int>(int x) l5; |
| 315 // The static function f5 sets `T` to `int`. | 370 // The static function f5 sets `T` to `int`. |
| 316 if (!tIsBool) { | 371 if (!tIsBool) { |
| 317 x5 = f5 as dynamic; | 372 x5 = f5 as dynamic; |
| 318 l5 = f5 as dynamic; | 373 l5 = f5 as dynamic; |
| 319 x5 = confuse(f5); | 374 x5 = confuse(f5); |
| 320 l5 = confuse(f5); | 375 l5 = confuse(f5); |
| 321 } | 376 } |
| 322 | 377 |
| 323 Expect.isTrue(m5 is F5); | 378 Expect.isTrue(m5 is F5); |
| 324 Expect.isTrue(m5 is int Function(int x1, [Function x]) Function<B extends co
re.int>(int x)); | 379 Expect.isTrue(m5 is int Function(int x1, |
| 380 [Function x]) Function<B extends core.int>(int x)); |
| 325 Expect.isTrue(confuse(m5) is F5); | 381 Expect.isTrue(confuse(m5) is F5); |
| 326 // In checked mode, verifies the type. | 382 // In checked mode, verifies the type. |
| 327 x5 = m5; | 383 x5 = m5; |
| 328 l5 = m5; | 384 l5 = m5; |
| 329 x5 = confuse(m5); | 385 x5 = confuse(m5); |
| 330 l5 = confuse(m5); | 386 l5 = confuse(m5); |
| 331 | |
| 332 } | 387 } |
| 333 | 388 |
| 334 /// int Function([core.List<core.int> x1]) Function<B extends core.int>(int x) | 389 /// int Function([core.List<core.int> x1]) Function<B extends core.int>(int x) |
| 335 void testF6() { | 390 void testF6() { |
| 336 Expect.isTrue(f6 is F6); | 391 Expect.isTrue(f6 is F6); |
| 337 Expect.isTrue(confuse(f6) is F6); | 392 Expect.isTrue(confuse(f6) is F6); |
| 338 // In checked mode, verifies the type. | 393 // In checked mode, verifies the type. |
| 339 int Function([core.List<core.int> x1]) Function<B extends core.int>(int x) l
6; | 394 int Function([core.List<core.int> x1]) Function<B extends core.int>(int x) |
| 395 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 extend
s 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 x, [int x1]) Function<B extends core.int>(int x) | 415 /// Function Function(int x, [int x1]) 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 x, [int x1]) Function<B extends core.int>(int x) l7; | 420 Function Function(int x, [int x1]) 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 x, [int x1]) Function<B extends co
re.int>(int x)); | 430 Expect.isTrue(m7 is Function Function(int x, |
| 431 [int x1]) 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 y, {List<Function> x}) Function<B extends core.int>(
int x) | 440 /// Function Function(int y, {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 y, {List<Function> x}) Function<B extends core.int>(in
t x) l8; | 445 Function Function(int y, {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 y, {List<Function> x}) Function<B
extends core.int>(int x)); | 456 Expect.isTrue(m8 is Function Function(int y, |
| 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
.int>(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(List<Function> x1) Function<B extends core.int>(in
t x) | 491 /// List<Function> Function(List<Function> x1) Function<B extends core.int>(in
t 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(List<Function> x1) Function<B extends core.int>(int
x) l10; | 496 List<Function> Function(List<Function> x1) Function<B extends core.int>( |
| 497 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(List<Function> x1) Function<B e
xtends core.int>(int x)); | 507 Expect.isTrue(m10 is List<Function> Function( |
| 508 List<Function> x1) 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 x, [List<T> x1]) Function<B extends core.int>(
int x) | 517 /// List<Function> Function(int x, [List<T> x1]) 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 x, [List<T> x1]) Function<B extends core.int>(in
t x) l11; | 522 List<Function> Function(int x, [List<T> x1]) 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 x, [List<T> x1]) Function<B
extends core.int>(int x)); | 533 Expect.isTrue(m11 is List<Function> Function(int x, |
| 534 [List<T> x1]) 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 x, [List<T> x1]) Function<B extends core.int
>(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 x, |
| 557 [List<T> x1]) 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 x, [List<T> x1]) Function<B extends core.int>(
int x) l11 = m11; | 565 List<Function> Function(int x, [List<T> x1]) Function<B extends core.int>( |
| 566 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(int x1, {Function x}) Function<B extends core
.int>(int x) | 573 /// core.List<core.int> Function(int x1, {Function x}) Function<B extends core
.int>(int 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(int x1, {Function x}) Function<B extends core.i
nt>(int x) l12; | 578 core.List<core.int> Function(int x1, |
| 579 {Function x}) Function<B extends core.int>(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(int x1, {Function x}) Func
tion<B extends core.int>(int x)); | 589 Expect.isTrue(m12 is core.List<core.int> Function(int x1, |
| 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>( |
| 605 int x) 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 ex
tends 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>(i
nt 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 y, [Function x]) Function<B extends core.int>(int x) | 655 /// List<T> Function(int y, [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 y, [Function x]) Function<B extends core.int>(int x) l1
4; | 660 List<T> Function(int y, [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 y, [Function x]) Function<B extend
s core.int>(int x)); | 671 Expect.isTrue(m14 is List<T> Function(int y, |
| 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 y, [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 y, [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 y, [Function x]) Function<B extends core.int>(int x)
l14 = m14; | 703 List<T> Function(int y, [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(int x2, [core.List<core.int> x3]) Function<B extends core
.int>(int x) | 711 /// List<T> Function(int x2, [core.List<core.int> x3]) Function<B extends core
.int>(int 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(int x2, [core.List<core.int> x3]) Function<B extends core.i
nt>(int x) l15; | 716 List<T> Function(int x2, |
| 717 [core.List<core.int> x3]) Function<B extends core.int>(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(int x2, [core.List<core.int> x3]) Func
tion<B extends core.int>(int x)); | 727 Expect.isTrue(m15 is List<T> Function(int x2, |
| 728 [core.List<core.int> x3]) 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(int x2, [core.List<core.int> x3]) Function<B extends co
re.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(int x2, |
| 751 [core.List<core.int> x3]) Function<B extends core.int>(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(int x2, [core.List<core.int> x3]) Function<B extends core
.int>(int x) l15 = m15; | 759 List<T> Function(int x2, |
| 760 [core.List<core.int> x3]) Function<B extends core.int>(int x) |
| 761 l15 = m15; |
| 654 // In checked mode, verifies the type. | 762 // In checked mode, verifies the type. |
| 655 x15 = m15; | 763 x15 = m15; |
| 656 x15 = confuse(m15); | 764 x15 = confuse(m15); |
| 657 } | 765 } |
| 658 } | 766 } |
| 659 | 767 |
| 660 /// Function({int x}) Function<B extends core.int>(int x) | 768 /// Function({int x}) Function<B extends core.int>(int x) |
| 661 void testF16() { | 769 void testF16() { |
| 662 Expect.isTrue(f16 is F16); | 770 Expect.isTrue(f16 is F16); |
| 663 Expect.isTrue(confuse(f16) is F16); | 771 Expect.isTrue(confuse(f16) is F16); |
| 664 // In checked mode, verifies the type. | 772 // In checked mode, verifies the type. |
| 665 Function({int x}) Function<B extends core.int>(int x) l16; | 773 Function({int x}) Function<B extends core.int>(int x) l16; |
| 666 // The static function f16 sets `T` to `int`. | 774 // The static function f16 sets `T` to `int`. |
| 667 if (!tIsBool) { | 775 if (!tIsBool) { |
| 668 x16 = f16 as dynamic; | 776 x16 = f16 as dynamic; |
| 669 l16 = f16 as dynamic; | 777 l16 = f16 as dynamic; |
| 670 x16 = confuse(f16); | 778 x16 = confuse(f16); |
| 671 l16 = confuse(f16); | 779 l16 = confuse(f16); |
| 672 } | 780 } |
| 673 | 781 |
| 674 Expect.isTrue(m16 is F16); | 782 Expect.isTrue(m16 is F16); |
| 675 Expect.isTrue(m16 is Function({int x}) Function<B extends core.int>(int x)); | 783 Expect.isTrue(m16 is Function({int x}) 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(core.List<core.int> x) Function<B extends core.int>(int x) | 792 /// Function(core.List<core.int> 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(core.List<core.int> x) Function<B extends core.int>(int x) l17; | 797 Function(core.List<core.int> 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(core.List<core.int> x) Function<B extends core
.int>(int x)); | 807 Expect.isTrue(m17 is Function( |
| 808 core.List<core.int> 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 x1, [int x]) Function<B extends core.int>(int x) | 817 /// void Function(int x1, [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 x1, [int x]) Function<B extends core.int>(int x) l18; | 822 void Function(int x1, [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 x1, [int x]) Function<B extends core.
int>(int x)); | 832 Expect.isTrue(m18 is void Function(int x1, |
| 833 [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 c
ore.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({List<T> x}) Function<B extends core.int>(int x) | 867 /// void Function({List<T> x}) 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({List<T> x}) Function<B extends core.int>(int x) l20; | 872 void Function({List<T> x}) 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({List<T> x}) Function<B extends core.int>
(int x)); | 882 Expect.isTrue( |
| 883 m20 is void Function({List<T> x}) 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); |
| 901 }); |
| 902 Expect.throws(() { |
| 903 x20 = confuse(f20); |
| 904 }); |
| 793 void Function({List<T> x}) Function<B extends core.int>(int x) l20; | 905 void Function({List<T> x}) Function<B extends core.int>(int x) l20; |
| 794 Expect.throws(() { l20 = (f20 as dynamic); }); | 906 Expect.throws(() { |
| 795 Expect.throws(() { l20 = confuse(f20); }); | 907 l20 = (f20 as dynamic); |
| 908 }); |
| 909 Expect.throws(() { |
| 910 l20 = confuse(f20); |
| 911 }); |
| 796 } | 912 } |
| 797 void Function({List<T> x}) Function<B extends core.int>(int x) l20 = m20; | 913 void Function({List<T> x}) Function<B extends core.int>(int x) l20 = m20; |
| 798 // In checked mode, verifies the type. | 914 // In checked mode, verifies the type. |
| 799 x20 = m20; | 915 x20 = m20; |
| 800 x20 = confuse(m20); | 916 x20 = confuse(m20); |
| 801 } | 917 } |
| 802 } | 918 } |
| 803 | 919 |
| 804 /// List<Function> Function<A>() Function<B extends core.int>(int x) | 920 /// List<Function> Function<A>() Function<B extends core.int>(int x) |
| 805 void testF21() { | 921 void testF21() { |
| 806 Expect.isTrue(f21 is F21); | 922 Expect.isTrue(f21 is F21); |
| 807 Expect.isTrue(confuse(f21) is F21); | 923 Expect.isTrue(confuse(f21) is F21); |
| 808 // In checked mode, verifies the type. | 924 // In checked mode, verifies the type. |
| 809 List<Function> Function<A>() Function<B extends core.int>(int x) l21; | 925 List<Function> Function<A>() Function<B extends core.int>(int x) l21; |
| 810 // The static function f21 sets `T` to `int`. | 926 // The static function f21 sets `T` to `int`. |
| 811 if (!tIsBool) { | 927 if (!tIsBool) { |
| 812 x21 = f21 as dynamic; | 928 x21 = f21 as dynamic; |
| 813 l21 = f21 as dynamic; | 929 l21 = f21 as dynamic; |
| 814 x21 = confuse(f21); | 930 x21 = confuse(f21); |
| 815 l21 = confuse(f21); | 931 l21 = confuse(f21); |
| 816 } | 932 } |
| 817 | 933 |
| 818 Expect.isTrue(m21 is F21); | 934 Expect.isTrue(m21 is F21); |
| 819 Expect.isTrue(m21 is List<Function> Function<A>() Function<B extends core.in
t>(int x)); | 935 Expect.isTrue(m21 |
| 936 is List<Function> Function<A>() Function<B extends core.int>(int x)); |
| 820 Expect.isTrue(confuse(m21) is F21); | 937 Expect.isTrue(confuse(m21) is F21); |
| 821 // In checked mode, verifies the type. | 938 // In checked mode, verifies the type. |
| 822 x21 = m21; | 939 x21 = m21; |
| 823 l21 = m21; | 940 l21 = m21; |
| 824 x21 = confuse(m21); | 941 x21 = confuse(m21); |
| 825 l21 = confuse(m21); | 942 l21 = confuse(m21); |
| 826 | |
| 827 } | 943 } |
| 828 | 944 |
| 829 /// Function<A>(A x) Function<B extends core.int>(int x) | 945 /// Function<A>(A x) Function<B extends core.int>(int x) |
| 830 void testF22() { | 946 void testF22() { |
| 831 Expect.isTrue(f22 is F22); | 947 Expect.isTrue(f22 is F22); |
| 832 Expect.isTrue(confuse(f22) is F22); | 948 Expect.isTrue(confuse(f22) is F22); |
| 833 // In checked mode, verifies the type. | 949 // In checked mode, verifies the type. |
| 834 Function<A>(A x) Function<B extends core.int>(int x) l22; | 950 Function<A>(A x) Function<B extends core.int>(int x) l22; |
| 835 // The static function f22 sets `T` to `int`. | 951 // The static function f22 sets `T` to `int`. |
| 836 if (!tIsBool) { | 952 if (!tIsBool) { |
| 837 x22 = f22 as dynamic; | 953 x22 = f22 as dynamic; |
| 838 l22 = f22 as dynamic; | 954 l22 = f22 as dynamic; |
| 839 x22 = confuse(f22); | 955 x22 = confuse(f22); |
| 840 l22 = confuse(f22); | 956 l22 = confuse(f22); |
| 841 } | 957 } |
| 842 | 958 |
| 843 Expect.isTrue(m22 is F22); | 959 Expect.isTrue(m22 is F22); |
| 844 Expect.isTrue(m22 is Function<A>(A x) Function<B extends core.int>(int x)); | 960 Expect.isTrue(m22 is Function<A>(A x) Function<B extends core.int>(int x)); |
| 845 Expect.isTrue(confuse(m22) is F22); | 961 Expect.isTrue(confuse(m22) is F22); |
| 846 // In checked mode, verifies the type. | 962 // In checked mode, verifies the type. |
| 847 x22 = m22; | 963 x22 = m22; |
| 848 l22 = m22; | 964 l22 = m22; |
| 849 x22 = confuse(m22); | 965 x22 = confuse(m22); |
| 850 l22 = confuse(m22); | 966 l22 = confuse(m22); |
| 851 | |
| 852 } | 967 } |
| 853 | 968 |
| 854 /// void Function<A>(List<A> x) Function<B extends core.int>(int x) | 969 /// void Function<A>(List<A> x) Function<B extends core.int>(int x) |
| 855 void testF23() { | 970 void testF23() { |
| 856 Expect.isTrue(f23 is F23); | 971 Expect.isTrue(f23 is F23); |
| 857 Expect.isTrue(confuse(f23) is F23); | 972 Expect.isTrue(confuse(f23) is F23); |
| 858 // In checked mode, verifies the type. | 973 // In checked mode, verifies the type. |
| 859 void Function<A>(List<A> x) Function<B extends core.int>(int x) l23; | 974 void Function<A>(List<A> x) Function<B extends core.int>(int x) l23; |
| 860 // The static function f23 sets `T` to `int`. | 975 // The static function f23 sets `T` to `int`. |
| 861 if (!tIsBool) { | 976 if (!tIsBool) { |
| 862 x23 = f23 as dynamic; | 977 x23 = f23 as dynamic; |
| 863 l23 = f23 as dynamic; | 978 l23 = f23 as dynamic; |
| 864 x23 = confuse(f23); | 979 x23 = confuse(f23); |
| 865 l23 = confuse(f23); | 980 l23 = confuse(f23); |
| 866 } | 981 } |
| 867 | 982 |
| 868 Expect.isTrue(m23 is F23); | 983 Expect.isTrue(m23 is F23); |
| 869 Expect.isTrue(m23 is void Function<A>(List<A> x) Function<B extends core.int
>(int x)); | 984 Expect.isTrue( |
| 985 m23 is void Function<A>(List<A> x) Function<B extends core.int>(int x)); |
| 870 Expect.isTrue(confuse(m23) is F23); | 986 Expect.isTrue(confuse(m23) is F23); |
| 871 // In checked mode, verifies the type. | 987 // In checked mode, verifies the type. |
| 872 x23 = m23; | 988 x23 = m23; |
| 873 l23 = m23; | 989 l23 = m23; |
| 874 x23 = confuse(m23); | 990 x23 = confuse(m23); |
| 875 l23 = confuse(m23); | 991 l23 = confuse(m23); |
| 876 | |
| 877 } | 992 } |
| 878 | |
| 879 | |
| 880 } | 993 } |
| 881 | 994 |
| 882 void main() { | 995 void main() { |
| 883 new U19().runTests(); | 996 new U19().runTests(); |
| 884 new U19<int>(tIsInt: true).runTests(); | 997 new U19<int>(tIsInt: true).runTests(); |
| 885 new U19<bool>(tIsBool: true).runTests(); | 998 new U19<bool>(tIsBool: true).runTests(); |
| 886 } | 999 } |
| 887 | |
| OLD | NEW |