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