| 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 typedef F0<T> = int Function(int x, [List<T> x2]); |
| 23 bool result = false; | 23 typedef F1<T> = List<Function> Function(int x1, [core.List<core.int> x2]); |
| 24 assert(result = true); | 24 typedef F2<T> = List<T> Function([List<Function> x1]); |
| 25 return result; | 25 typedef F3<T> = void Function(Function x0); |
| 26 })(); | 26 typedef F4<T> = List<A> Function<A>(core.List<core.int> x); |
| 27 | 27 typedef F5<T> = int Function(int y, {Function x}) Function<B extends core.int>( |
| 28 typedef F0<T> | 28 int x); |
| 29 = int Function(int x, [List<T> x2]); | 29 typedef F6<T> = int Function(int x1, [List<T> x]) Function<B extends core.int>( |
| 30 typedef F1<T> | 30 int x); |
| 31 = List<Function> Function(int x1, [core.List<core.int> x2]); | 31 typedef F7<T> = Function Function(Function x1) Function<B extends core.int>( |
| 32 typedef F2<T> | 32 int x); |
| 33 = List<T> Function([List<Function> x1]); | 33 typedef F8<T> = Function Function(int x, [core.List<core.int> x1]) |
| 34 typedef F3<T> | 34 Function<B extends core.int>(int x); |
| 35 = void Function(Function x0); | 35 typedef F9<T> = List<Function> Function(int x1, {int x}) |
| 36 typedef F4<T> | 36 Function<B extends core.int>(int x); |
| 37 = List<A> Function<A>(core.List<core.int> x); | 37 typedef F10<T> = List<Function> Function([core.List<core.int> x]) |
| 38 typedef F5<T> | 38 Function<B extends core.int>(int x); |
| 39 = int Function(int y, {Function x}) Function<B extends core.int>(int x); | 39 typedef F11<T> = core.List<core.int> Function(int y, [int x]) |
| 40 typedef F6<T> | 40 Function<B extends core.int>(int x); |
| 41 = int Function(int x1, [List<T> x]) Function<B extends core.int>(int x); | 41 typedef F12<T> = core.List<core.int> Function(int x2, [List<Function> x3]) |
| 42 typedef F7<T> | 42 Function<B extends core.int>(int x); |
| 43 = Function Function(Function x1) Function<B extends core.int>(int x); | 43 typedef F13<T> = core.List<core.int> Function(int x1, {List<T> x}) |
| 44 typedef F8<T> | 44 Function<B extends core.int>(int x); |
| 45 = Function Function(int x, | 45 typedef F14<T> = List<T> Function(List<Function> x) |
| 46 [core.List<core.int> x1]) Function<B extends core.int>(int x); | 46 Function<B extends core.int>(int x); |
| 47 typedef F9<T> | 47 typedef F15<T> = List<T> Function(int y, [List<T> x]) |
| 48 = List<Function> Function(int x1, {int x}) Function<B extends core.int>( | 48 Function<B extends core.int>(int x); |
| 49 int x); | 49 typedef F16<T> = Function([Function x1]) Function<B extends core.int>(int x); |
| 50 typedef F10<T> | 50 typedef F17<T> = Function({core.List<core.int> x}) Function<B extends core.int>( |
| 51 = List<Function> Function( | 51 int x); |
| 52 [core.List<core.int> x]) Function<B extends core.int>(int x); | 52 typedef F18<T> = void Function(int y, {int x}) Function<B extends core.int>( |
| 53 typedef F11<T> | 53 int x); |
| 54 = core.List<core.int> Function(int y, [int x]) Function<B extends core.int>( | 54 typedef F19<T> = void Function(int x1, [core.List<core.int> x]) |
| 55 int x); | 55 Function<B extends core.int>(int x); |
| 56 typedef F12<T> | 56 typedef F20<T> = int Function<A>(List<T> x) Function<B extends core.int>(int x); |
| 57 = core.List<core.int> Function(int x2, | 57 typedef F21<T> = core.List<core.int> Function<A>() Function<B extends core.int>( |
| 58 [List<Function> x3]) Function<B extends core.int>(int x); | 58 int x); |
| 59 typedef F13<T> | 59 typedef F22<T> = A Function<A>(A x) Function<B extends core.int>(int x); |
| 60 = core.List<core.int> Function(int x1, | |
| 61 {List<T> x}) Function<B extends core.int>(int x); | |
| 62 typedef F14<T> | |
| 63 = List<T> Function(List<Function> x) Function<B extends core.int>(int x); | |
| 64 typedef F15<T> | |
| 65 = List<T> Function(int y, [List<T> x]) Function<B extends core.int>(int x); | |
| 66 typedef F16<T> | |
| 67 = Function([Function x1]) Function<B extends core.int>(int x); | |
| 68 typedef F17<T> | |
| 69 = Function({core.List<core.int> x}) Function<B extends core.int>(int x); | |
| 70 typedef F18<T> | |
| 71 = void Function(int y, {int x}) Function<B extends core.int>(int x); | |
| 72 typedef F19<T> | |
| 73 = void Function(int x1, | |
| 74 [core.List<core.int> x]) Function<B extends core.int>(int x); | |
| 75 typedef F20<T> | |
| 76 = int Function<A>(List<T> x) Function<B extends core.int>(int x); | |
| 77 typedef F21<T> | |
| 78 = core.List<core.int> Function<A>() Function<B extends core.int>(int x); | |
| 79 typedef F22<T> | |
| 80 = A Function<A>(A x) Function<B extends core.int>(int x); | |
| 81 | 60 |
| 82 int f0(int x, [List<int> x0]) => null; | 61 int f0(int x, [List<int> x0]) => null; |
| 83 List<Function> f1(int x0, [core.List<core.int> x1]) => null; | 62 List<Function> f1(int x0, [core.List<core.int> x1]) => null; |
| 84 List<int> f2([List<Function> x0]) => null; | 63 List<int> f2([List<Function> x0]) => null; |
| 85 void f3(Function x0) => null; | 64 void f3(Function x0) => null; |
| 86 List<A> f4<A>(core.List<core.int> x) => null; | 65 List<A> f4<A>(core.List<core.int> x) => null; |
| 87 int Function(int y, {Function x}) f5<B extends core.int>(int x) => null; | 66 int Function(int y, {Function x}) f5<B extends core.int>(int x) => null; |
| 88 int Function(int x0, [List<int> x]) f6<B extends core.int>(int x) => null; | 67 int Function(int x0, [List<int> x]) f6<B extends core.int>(int x) => null; |
| 89 Function Function(Function x0) f7<B extends core.int>(int x) => null; | 68 Function Function(Function x0) f7<B extends core.int>(int x) => null; |
| 90 Function Function(int x, [core.List<core.int> x0]) f8<B extends core.int>( | 69 Function Function(int x, [core.List<core.int> x0]) f8<B extends core.int>( |
| (...skipping 27 matching lines...) Expand all Loading... |
| 118 final bool tIsDynamic; | 97 final bool tIsDynamic; |
| 119 | 98 |
| 120 int Function(int x, [List<T> x2]) x0; | 99 int Function(int x, [List<T> x2]) x0; |
| 121 List<Function> Function(int x1, [core.List<core.int> x2]) x1; | 100 List<Function> Function(int x1, [core.List<core.int> x2]) x1; |
| 122 List<T> Function([List<Function> x1]) x2; | 101 List<T> Function([List<Function> x1]) x2; |
| 123 void Function(Function x0) x3; | 102 void Function(Function x0) x3; |
| 124 List<A> Function<A>(core.List<core.int> x) x4; | 103 List<A> Function<A>(core.List<core.int> x) x4; |
| 125 int Function(int y, {Function x}) Function<B extends core.int>(int x) x5; | 104 int Function(int y, {Function x}) Function<B extends core.int>(int x) x5; |
| 126 int Function(int x1, [List<T> x]) Function<B extends core.int>(int x) x6; | 105 int Function(int x1, [List<T> x]) Function<B extends core.int>(int x) x6; |
| 127 Function Function(Function x1) Function<B extends core.int>(int x) x7; | 106 Function Function(Function x1) Function<B extends core.int>(int x) x7; |
| 128 Function Function(int x, | 107 Function Function(int x, [core.List<core.int> x1]) |
| 129 [core.List<core.int> x1]) Function<B extends core.int>(int x) x8; | 108 Function<B extends core.int>(int x) x8; |
| 130 List<Function> Function(int x1, {int x}) Function<B extends core.int>(int x) | 109 List<Function> Function(int x1, {int x}) Function<B extends core.int>(int x) |
| 131 x9; | 110 x9; |
| 132 List<Function> Function([core.List<core.int> x]) Function<B extends core.int>( | 111 List<Function> Function([core.List<core.int> x]) Function<B extends core.int>( |
| 133 int x) x10; | 112 int x) x10; |
| 134 core.List<core.int> Function(int y, [int x]) Function<B extends core.int>( | 113 core.List<core.int> Function(int y, [int x]) Function<B extends core.int>( |
| 135 int x) x11; | 114 int x) x11; |
| 136 core.List<core.int> Function(int x2, | 115 core.List<core.int> Function(int x2, [List<Function> x3]) |
| 137 [List<Function> x3]) Function<B extends core.int>(int x) x12; | 116 Function<B extends core.int>(int x) x12; |
| 138 core.List<core.int> Function(int x1, | 117 core.List<core.int> Function(int x1, {List<T> x}) |
| 139 {List<T> x}) Function<B extends core.int>(int x) x13; | 118 Function<B extends core.int>(int x) x13; |
| 140 List<T> Function(List<Function> x) Function<B extends core.int>(int x) x14; | 119 List<T> Function(List<Function> x) Function<B extends core.int>(int x) x14; |
| 141 List<T> Function(int y, [List<T> x]) Function<B extends core.int>(int x) x15; | 120 List<T> Function(int y, [List<T> x]) Function<B extends core.int>(int x) x15; |
| 142 Function([Function x1]) Function<B extends core.int>(int x) x16; | 121 Function([Function x1]) Function<B extends core.int>(int x) x16; |
| 143 Function({core.List<core.int> x}) Function<B extends core.int>(int x) x17; | 122 Function({core.List<core.int> x}) Function<B extends core.int>(int x) x17; |
| 144 void Function(int y, {int x}) Function<B extends core.int>(int x) x18; | 123 void Function(int y, {int x}) Function<B extends core.int>(int x) x18; |
| 145 void Function(int x1, [core.List<core.int> x]) Function<B extends core.int>( | 124 void Function(int x1, [core.List<core.int> x]) Function<B extends core.int>( |
| 146 int x) x19; | 125 int x) x19; |
| 147 int Function<A>(List<T> x) Function<B extends core.int>(int x) x20; | 126 int Function<A>(List<T> x) Function<B extends core.int>(int x) x20; |
| 148 core.List<core.int> Function<A>() Function<B extends core.int>(int x) x21; | 127 core.List<core.int> Function<A>() Function<B extends core.int>(int x) x21; |
| 149 A Function<A>(A x) Function<B extends core.int>(int x) x22; | 128 A Function<A>(A x) Function<B extends core.int>(int x) x22; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 x0 = confuse(m0); | 214 x0 = confuse(m0); |
| 236 l0 = confuse(m0); | 215 l0 = confuse(m0); |
| 237 if (!tIsBool) { | 216 if (!tIsBool) { |
| 238 Expect.isTrue(f0 is F0<int>); | 217 Expect.isTrue(f0 is F0<int>); |
| 239 Expect.isFalse(f0 is F0<bool>); | 218 Expect.isFalse(f0 is F0<bool>); |
| 240 Expect.isTrue(confuse(f0) is F0<int>); | 219 Expect.isTrue(confuse(f0) is F0<int>); |
| 241 Expect.isFalse(confuse(f0) is F0<bool>); | 220 Expect.isFalse(confuse(f0) is F0<bool>); |
| 242 Expect.equals(tIsDynamic, m0 is F0<bool>); | 221 Expect.equals(tIsDynamic, m0 is F0<bool>); |
| 243 Expect.equals(tIsDynamic, confuse(m0) is F0<bool>); | 222 Expect.equals(tIsDynamic, confuse(m0) is F0<bool>); |
| 244 } else { | 223 } else { |
| 245 if (inCheckedMode) { | 224 if (typeAssertionsEnabled) { |
| 246 Expect.throws(() { | 225 Expect.throws(() { |
| 247 x0 = (f0 as dynamic); | 226 x0 = (f0 as dynamic); |
| 248 }); | 227 }); |
| 249 Expect.throws(() { | 228 Expect.throws(() { |
| 250 x0 = confuse(f0); | 229 x0 = confuse(f0); |
| 251 }); | 230 }); |
| 252 int Function(int x, [List<T> x2]) l0; | 231 int Function(int x, [List<T> x2]) l0; |
| 253 Expect.throws(() { | 232 Expect.throws(() { |
| 254 l0 = (f0 as dynamic); | 233 l0 = (f0 as dynamic); |
| 255 }); | 234 }); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 x2 = confuse(m2); | 291 x2 = confuse(m2); |
| 313 l2 = confuse(m2); | 292 l2 = confuse(m2); |
| 314 if (!tIsBool) { | 293 if (!tIsBool) { |
| 315 Expect.isTrue(f2 is F2<int>); | 294 Expect.isTrue(f2 is F2<int>); |
| 316 Expect.isFalse(f2 is F2<bool>); | 295 Expect.isFalse(f2 is F2<bool>); |
| 317 Expect.isTrue(confuse(f2) is F2<int>); | 296 Expect.isTrue(confuse(f2) is F2<int>); |
| 318 Expect.isFalse(confuse(f2) is F2<bool>); | 297 Expect.isFalse(confuse(f2) is F2<bool>); |
| 319 Expect.equals(tIsDynamic, m2 is F2<bool>); | 298 Expect.equals(tIsDynamic, m2 is F2<bool>); |
| 320 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); | 299 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); |
| 321 } else { | 300 } else { |
| 322 if (inCheckedMode) { | 301 if (typeAssertionsEnabled) { |
| 323 Expect.throws(() { | 302 Expect.throws(() { |
| 324 x2 = (f2 as dynamic); | 303 x2 = (f2 as dynamic); |
| 325 }); | 304 }); |
| 326 Expect.throws(() { | 305 Expect.throws(() { |
| 327 x2 = confuse(f2); | 306 x2 = confuse(f2); |
| 328 }); | 307 }); |
| 329 List<T> Function([List<Function> x1]) l2; | 308 List<T> Function([List<Function> x1]) l2; |
| 330 Expect.throws(() { | 309 Expect.throws(() { |
| 331 l2 = (f2 as dynamic); | 310 l2 = (f2 as dynamic); |
| 332 }); | 311 }); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 int Function(int y, {Function x}) Function<B extends core.int>(int x) l5; | 376 int Function(int y, {Function x}) Function<B extends core.int>(int x) l5; |
| 398 // The static function f5 sets `T` to `int`. | 377 // The static function f5 sets `T` to `int`. |
| 399 if (!tIsBool) { | 378 if (!tIsBool) { |
| 400 x5 = f5 as dynamic; | 379 x5 = f5 as dynamic; |
| 401 l5 = f5 as dynamic; | 380 l5 = f5 as dynamic; |
| 402 x5 = confuse(f5); | 381 x5 = confuse(f5); |
| 403 l5 = confuse(f5); | 382 l5 = confuse(f5); |
| 404 } | 383 } |
| 405 | 384 |
| 406 Expect.isTrue(m5 is F5); | 385 Expect.isTrue(m5 is F5); |
| 407 Expect.isTrue(m5 is int Function(int y, | 386 Expect.isTrue(m5 is int Function(int y, {Function x}) |
| 408 {Function x}) Function<B extends core.int>(int x)); | 387 Function<B extends core.int>(int x)); |
| 409 Expect.isTrue(confuse(m5) is F5); | 388 Expect.isTrue(confuse(m5) is F5); |
| 410 // In checked mode, verifies the type. | 389 // In checked mode, verifies the type. |
| 411 x5 = m5; | 390 x5 = m5; |
| 412 l5 = m5; | 391 l5 = m5; |
| 413 x5 = confuse(m5); | 392 x5 = confuse(m5); |
| 414 l5 = confuse(m5); | 393 l5 = confuse(m5); |
| 415 } | 394 } |
| 416 | 395 |
| 417 /// int Function(int x1, [List<T> x]) Function<B extends core.int>(int x) | 396 /// int Function(int x1, [List<T> x]) Function<B extends core.int>(int x) |
| 418 void testF6() { | 397 void testF6() { |
| 419 Expect.isTrue(f6 is F6); | 398 Expect.isTrue(f6 is F6); |
| 420 Expect.isTrue(confuse(f6) is F6); | 399 Expect.isTrue(confuse(f6) is F6); |
| 421 // In checked mode, verifies the type. | 400 // In checked mode, verifies the type. |
| 422 int Function(int x1, [List<T> x]) Function<B extends core.int>(int x) l6; | 401 int Function(int x1, [List<T> x]) Function<B extends core.int>(int x) l6; |
| 423 // The static function f6 sets `T` to `int`. | 402 // The static function f6 sets `T` to `int`. |
| 424 if (!tIsBool) { | 403 if (!tIsBool) { |
| 425 x6 = f6 as dynamic; | 404 x6 = f6 as dynamic; |
| 426 l6 = f6 as dynamic; | 405 l6 = f6 as dynamic; |
| 427 x6 = confuse(f6); | 406 x6 = confuse(f6); |
| 428 l6 = confuse(f6); | 407 l6 = confuse(f6); |
| 429 } | 408 } |
| 430 | 409 |
| 431 Expect.isTrue(m6 is F6); | 410 Expect.isTrue(m6 is F6); |
| 432 Expect.isTrue(m6 is int Function(int x1, | 411 Expect.isTrue(m6 is int Function(int x1, [List<T> x]) |
| 433 [List<T> x]) Function<B extends core.int>(int x)); | 412 Function<B extends core.int>(int x)); |
| 434 Expect.isTrue(confuse(m6) is F6); | 413 Expect.isTrue(confuse(m6) is F6); |
| 435 // In checked mode, verifies the type. | 414 // In checked mode, verifies the type. |
| 436 x6 = m6; | 415 x6 = m6; |
| 437 l6 = m6; | 416 l6 = m6; |
| 438 x6 = confuse(m6); | 417 x6 = confuse(m6); |
| 439 l6 = confuse(m6); | 418 l6 = confuse(m6); |
| 440 if (!tIsBool) { | 419 if (!tIsBool) { |
| 441 Expect.isTrue(f6 is F6<int>); | 420 Expect.isTrue(f6 is F6<int>); |
| 442 Expect.isFalse(f6 is F6<bool>); | 421 Expect.isFalse(f6 is F6<bool>); |
| 443 Expect.isTrue(confuse(f6) is F6<int>); | 422 Expect.isTrue(confuse(f6) is F6<int>); |
| 444 Expect.isFalse(confuse(f6) is F6<bool>); | 423 Expect.isFalse(confuse(f6) is F6<bool>); |
| 445 Expect.equals(tIsDynamic, m6 is F6<bool>); | 424 Expect.equals(tIsDynamic, m6 is F6<bool>); |
| 446 Expect.equals(tIsDynamic, confuse(m6) is F6<bool>); | 425 Expect.equals(tIsDynamic, confuse(m6) is F6<bool>); |
| 447 } else { | 426 } else { |
| 448 if (inCheckedMode) { | 427 if (typeAssertionsEnabled) { |
| 449 Expect.throws(() { | 428 Expect.throws(() { |
| 450 x6 = (f6 as dynamic); | 429 x6 = (f6 as dynamic); |
| 451 }); | 430 }); |
| 452 Expect.throws(() { | 431 Expect.throws(() { |
| 453 x6 = confuse(f6); | 432 x6 = confuse(f6); |
| 454 }); | 433 }); |
| 455 int Function(int x1, [List<T> x]) Function<B extends core.int>(int x) | 434 int Function(int x1, [List<T> x]) Function<B extends core.int>(int x) |
| 456 l6; | 435 l6; |
| 457 Expect.throws(() { | 436 Expect.throws(() { |
| 458 l6 = (f6 as dynamic); | 437 l6 = (f6 as dynamic); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 477 Function Function(Function x1) Function<B extends core.int>(int x) l7; | 456 Function Function(Function x1) Function<B extends core.int>(int x) l7; |
| 478 // The static function f7 sets `T` to `int`. | 457 // The static function f7 sets `T` to `int`. |
| 479 if (!tIsBool) { | 458 if (!tIsBool) { |
| 480 x7 = f7 as dynamic; | 459 x7 = f7 as dynamic; |
| 481 l7 = f7 as dynamic; | 460 l7 = f7 as dynamic; |
| 482 x7 = confuse(f7); | 461 x7 = confuse(f7); |
| 483 l7 = confuse(f7); | 462 l7 = confuse(f7); |
| 484 } | 463 } |
| 485 | 464 |
| 486 Expect.isTrue(m7 is F7); | 465 Expect.isTrue(m7 is F7); |
| 487 Expect.isTrue(m7 is Function Function( | 466 Expect.isTrue(m7 is Function Function(Function x1) |
| 488 Function x1) Function<B extends core.int>(int x)); | 467 Function<B extends core.int>(int x)); |
| 489 Expect.isTrue(confuse(m7) is F7); | 468 Expect.isTrue(confuse(m7) is F7); |
| 490 // In checked mode, verifies the type. | 469 // In checked mode, verifies the type. |
| 491 x7 = m7; | 470 x7 = m7; |
| 492 l7 = m7; | 471 l7 = m7; |
| 493 x7 = confuse(m7); | 472 x7 = confuse(m7); |
| 494 l7 = confuse(m7); | 473 l7 = confuse(m7); |
| 495 } | 474 } |
| 496 | 475 |
| 497 /// Function Function(int x, [core.List<core.int> x1]) Function<B extends core
.int>(int x) | 476 /// Function Function(int x, [core.List<core.int> x1]) Function<B extends core
.int>(int x) |
| 498 void testF8() { | 477 void testF8() { |
| 499 Expect.isTrue(f8 is F8); | 478 Expect.isTrue(f8 is F8); |
| 500 Expect.isTrue(confuse(f8) is F8); | 479 Expect.isTrue(confuse(f8) is F8); |
| 501 // In checked mode, verifies the type. | 480 // In checked mode, verifies the type. |
| 502 Function Function(int x, | 481 Function Function(int x, [core.List<core.int> x1]) |
| 503 [core.List<core.int> x1]) Function<B extends core.int>(int x) l8; | 482 Function<B extends core.int>(int x) l8; |
| 504 // The static function f8 sets `T` to `int`. | 483 // The static function f8 sets `T` to `int`. |
| 505 if (!tIsBool) { | 484 if (!tIsBool) { |
| 506 x8 = f8 as dynamic; | 485 x8 = f8 as dynamic; |
| 507 l8 = f8 as dynamic; | 486 l8 = f8 as dynamic; |
| 508 x8 = confuse(f8); | 487 x8 = confuse(f8); |
| 509 l8 = confuse(f8); | 488 l8 = confuse(f8); |
| 510 } | 489 } |
| 511 | 490 |
| 512 Expect.isTrue(m8 is F8); | 491 Expect.isTrue(m8 is F8); |
| 513 Expect.isTrue(m8 is Function Function(int x, | 492 Expect.isTrue(m8 is Function Function(int x, [core.List<core.int> x1]) |
| 514 [core.List<core.int> x1]) Function<B extends core.int>(int x)); | 493 Function<B extends core.int>(int x)); |
| 515 Expect.isTrue(confuse(m8) is F8); | 494 Expect.isTrue(confuse(m8) is F8); |
| 516 // In checked mode, verifies the type. | 495 // In checked mode, verifies the type. |
| 517 x8 = m8; | 496 x8 = m8; |
| 518 l8 = m8; | 497 l8 = m8; |
| 519 x8 = confuse(m8); | 498 x8 = confuse(m8); |
| 520 l8 = confuse(m8); | 499 l8 = confuse(m8); |
| 521 } | 500 } |
| 522 | 501 |
| 523 /// List<Function> Function(int x1, {int x}) Function<B extends core.int>(int
x) | 502 /// List<Function> Function(int x1, {int x}) Function<B extends core.int>(int
x) |
| 524 void testF9() { | 503 void testF9() { |
| 525 Expect.isTrue(f9 is F9); | 504 Expect.isTrue(f9 is F9); |
| 526 Expect.isTrue(confuse(f9) is F9); | 505 Expect.isTrue(confuse(f9) is F9); |
| 527 // In checked mode, verifies the type. | 506 // In checked mode, verifies the type. |
| 528 List<Function> Function(int x1, {int x}) Function<B extends core.int>(int x) | 507 List<Function> Function(int x1, {int x}) Function<B extends core.int>(int x) |
| 529 l9; | 508 l9; |
| 530 // The static function f9 sets `T` to `int`. | 509 // The static function f9 sets `T` to `int`. |
| 531 if (!tIsBool) { | 510 if (!tIsBool) { |
| 532 x9 = f9 as dynamic; | 511 x9 = f9 as dynamic; |
| 533 l9 = f9 as dynamic; | 512 l9 = f9 as dynamic; |
| 534 x9 = confuse(f9); | 513 x9 = confuse(f9); |
| 535 l9 = confuse(f9); | 514 l9 = confuse(f9); |
| 536 } | 515 } |
| 537 | 516 |
| 538 Expect.isTrue(m9 is F9); | 517 Expect.isTrue(m9 is F9); |
| 539 Expect.isTrue(m9 is List<Function> Function(int x1, | 518 Expect.isTrue(m9 is List<Function> Function(int x1, {int x}) |
| 540 {int x}) Function<B extends core.int>(int x)); | 519 Function<B extends core.int>(int x)); |
| 541 Expect.isTrue(confuse(m9) is F9); | 520 Expect.isTrue(confuse(m9) is F9); |
| 542 // In checked mode, verifies the type. | 521 // In checked mode, verifies the type. |
| 543 x9 = m9; | 522 x9 = m9; |
| 544 l9 = m9; | 523 l9 = m9; |
| 545 x9 = confuse(m9); | 524 x9 = confuse(m9); |
| 546 l9 = confuse(m9); | 525 l9 = confuse(m9); |
| 547 } | 526 } |
| 548 | 527 |
| 549 /// List<Function> Function([core.List<core.int> x]) Function<B extends core.i
nt>(int x) | 528 /// List<Function> Function([core.List<core.int> x]) Function<B extends core.i
nt>(int x) |
| 550 void testF10() { | 529 void testF10() { |
| 551 Expect.isTrue(f10 is F10); | 530 Expect.isTrue(f10 is F10); |
| 552 Expect.isTrue(confuse(f10) is F10); | 531 Expect.isTrue(confuse(f10) is F10); |
| 553 // In checked mode, verifies the type. | 532 // In checked mode, verifies the type. |
| 554 List<Function> Function( | 533 List<Function> Function([core.List<core.int> x]) |
| 555 [core.List<core.int> x]) Function<B extends core.int>(int x) l10; | 534 Function<B extends core.int>(int x) l10; |
| 556 // The static function f10 sets `T` to `int`. | 535 // The static function f10 sets `T` to `int`. |
| 557 if (!tIsBool) { | 536 if (!tIsBool) { |
| 558 x10 = f10 as dynamic; | 537 x10 = f10 as dynamic; |
| 559 l10 = f10 as dynamic; | 538 l10 = f10 as dynamic; |
| 560 x10 = confuse(f10); | 539 x10 = confuse(f10); |
| 561 l10 = confuse(f10); | 540 l10 = confuse(f10); |
| 562 } | 541 } |
| 563 | 542 |
| 564 Expect.isTrue(m10 is F10); | 543 Expect.isTrue(m10 is F10); |
| 565 Expect.isTrue(m10 is List<Function> Function( | 544 Expect.isTrue(m10 is List<Function> Function([core.List<core.int> x]) |
| 566 [core.List<core.int> x]) Function<B extends core.int>(int x)); | 545 Function<B extends core.int>(int x)); |
| 567 Expect.isTrue(confuse(m10) is F10); | 546 Expect.isTrue(confuse(m10) is F10); |
| 568 // In checked mode, verifies the type. | 547 // In checked mode, verifies the type. |
| 569 x10 = m10; | 548 x10 = m10; |
| 570 l10 = m10; | 549 l10 = m10; |
| 571 x10 = confuse(m10); | 550 x10 = confuse(m10); |
| 572 l10 = confuse(m10); | 551 l10 = confuse(m10); |
| 573 } | 552 } |
| 574 | 553 |
| 575 /// core.List<core.int> Function(int y, [int x]) Function<B extends core.int>(
int x) | 554 /// core.List<core.int> Function(int y, [int x]) Function<B extends core.int>(
int x) |
| 576 void testF11() { | 555 void testF11() { |
| 577 Expect.isTrue(f11 is F11); | 556 Expect.isTrue(f11 is F11); |
| 578 Expect.isTrue(confuse(f11) is F11); | 557 Expect.isTrue(confuse(f11) is F11); |
| 579 // In checked mode, verifies the type. | 558 // In checked mode, verifies the type. |
| 580 core.List<core.int> Function(int y, [int x]) Function<B extends core.int>( | 559 core.List<core.int> Function(int y, [int x]) Function<B extends core.int>( |
| 581 int x) l11; | 560 int x) l11; |
| 582 // The static function f11 sets `T` to `int`. | 561 // The static function f11 sets `T` to `int`. |
| 583 if (!tIsBool) { | 562 if (!tIsBool) { |
| 584 x11 = f11 as dynamic; | 563 x11 = f11 as dynamic; |
| 585 l11 = f11 as dynamic; | 564 l11 = f11 as dynamic; |
| 586 x11 = confuse(f11); | 565 x11 = confuse(f11); |
| 587 l11 = confuse(f11); | 566 l11 = confuse(f11); |
| 588 } | 567 } |
| 589 | 568 |
| 590 Expect.isTrue(m11 is F11); | 569 Expect.isTrue(m11 is F11); |
| 591 Expect.isTrue(m11 is core.List<core.int> Function(int y, | 570 Expect.isTrue(m11 is core.List<core.int> Function(int y, [int x]) |
| 592 [int x]) Function<B extends core.int>(int x)); | 571 Function<B extends core.int>(int x)); |
| 593 Expect.isTrue(confuse(m11) is F11); | 572 Expect.isTrue(confuse(m11) is F11); |
| 594 // In checked mode, verifies the type. | 573 // In checked mode, verifies the type. |
| 595 x11 = m11; | 574 x11 = m11; |
| 596 l11 = m11; | 575 l11 = m11; |
| 597 x11 = confuse(m11); | 576 x11 = confuse(m11); |
| 598 l11 = confuse(m11); | 577 l11 = confuse(m11); |
| 599 } | 578 } |
| 600 | 579 |
| 601 /// core.List<core.int> Function(int x2, [List<Function> x3]) Function<B exten
ds core.int>(int x) | 580 /// core.List<core.int> Function(int x2, [List<Function> x3]) Function<B exten
ds core.int>(int x) |
| 602 void testF12() { | 581 void testF12() { |
| 603 Expect.isTrue(f12 is F12); | 582 Expect.isTrue(f12 is F12); |
| 604 Expect.isTrue(confuse(f12) is F12); | 583 Expect.isTrue(confuse(f12) is F12); |
| 605 // In checked mode, verifies the type. | 584 // In checked mode, verifies the type. |
| 606 core.List<core.int> Function(int x2, | 585 core.List<core.int> Function(int x2, [List<Function> x3]) |
| 607 [List<Function> x3]) Function<B extends core.int>(int x) l12; | 586 Function<B extends core.int>(int x) l12; |
| 608 // The static function f12 sets `T` to `int`. | 587 // The static function f12 sets `T` to `int`. |
| 609 if (!tIsBool) { | 588 if (!tIsBool) { |
| 610 x12 = f12 as dynamic; | 589 x12 = f12 as dynamic; |
| 611 l12 = f12 as dynamic; | 590 l12 = f12 as dynamic; |
| 612 x12 = confuse(f12); | 591 x12 = confuse(f12); |
| 613 l12 = confuse(f12); | 592 l12 = confuse(f12); |
| 614 } | 593 } |
| 615 | 594 |
| 616 Expect.isTrue(m12 is F12); | 595 Expect.isTrue(m12 is F12); |
| 617 Expect.isTrue(m12 is core.List<core.int> Function(int x2, | 596 Expect.isTrue(m12 is core.List<core.int> Function(int x2, |
| 618 [List<Function> x3]) Function<B extends core.int>(int x)); | 597 [List<Function> x3]) |
| 598 Function<B extends core.int>(int x)); |
| 619 Expect.isTrue(confuse(m12) is F12); | 599 Expect.isTrue(confuse(m12) is F12); |
| 620 // In checked mode, verifies the type. | 600 // In checked mode, verifies the type. |
| 621 x12 = m12; | 601 x12 = m12; |
| 622 l12 = m12; | 602 l12 = m12; |
| 623 x12 = confuse(m12); | 603 x12 = confuse(m12); |
| 624 l12 = confuse(m12); | 604 l12 = confuse(m12); |
| 625 } | 605 } |
| 626 | 606 |
| 627 /// core.List<core.int> Function(int x1, {List<T> x}) Function<B extends core.
int>(int x) | 607 /// core.List<core.int> Function(int x1, {List<T> x}) Function<B extends core.
int>(int x) |
| 628 void testF13() { | 608 void testF13() { |
| 629 Expect.isTrue(f13 is F13); | 609 Expect.isTrue(f13 is F13); |
| 630 Expect.isTrue(confuse(f13) is F13); | 610 Expect.isTrue(confuse(f13) is F13); |
| 631 // In checked mode, verifies the type. | 611 // In checked mode, verifies the type. |
| 632 core.List<core.int> Function(int x1, | 612 core.List<core.int> Function(int x1, {List<T> x}) |
| 633 {List<T> x}) Function<B extends core.int>(int x) l13; | 613 Function<B extends core.int>(int x) l13; |
| 634 // The static function f13 sets `T` to `int`. | 614 // The static function f13 sets `T` to `int`. |
| 635 if (!tIsBool) { | 615 if (!tIsBool) { |
| 636 x13 = f13 as dynamic; | 616 x13 = f13 as dynamic; |
| 637 l13 = f13 as dynamic; | 617 l13 = f13 as dynamic; |
| 638 x13 = confuse(f13); | 618 x13 = confuse(f13); |
| 639 l13 = confuse(f13); | 619 l13 = confuse(f13); |
| 640 } | 620 } |
| 641 | 621 |
| 642 Expect.isTrue(m13 is F13); | 622 Expect.isTrue(m13 is F13); |
| 643 Expect.isTrue(m13 is core.List<core.int> Function(int x1, | 623 Expect.isTrue(m13 is core.List<core.int> Function(int x1, {List<T> x}) |
| 644 {List<T> x}) Function<B extends core.int>(int x)); | 624 Function<B extends core.int>(int x)); |
| 645 Expect.isTrue(confuse(m13) is F13); | 625 Expect.isTrue(confuse(m13) is F13); |
| 646 // In checked mode, verifies the type. | 626 // In checked mode, verifies the type. |
| 647 x13 = m13; | 627 x13 = m13; |
| 648 l13 = m13; | 628 l13 = m13; |
| 649 x13 = confuse(m13); | 629 x13 = confuse(m13); |
| 650 l13 = confuse(m13); | 630 l13 = confuse(m13); |
| 651 if (!tIsBool) { | 631 if (!tIsBool) { |
| 652 Expect.isTrue(f13 is F13<int>); | 632 Expect.isTrue(f13 is F13<int>); |
| 653 Expect.isFalse(f13 is F13<bool>); | 633 Expect.isFalse(f13 is F13<bool>); |
| 654 Expect.isTrue(confuse(f13) is F13<int>); | 634 Expect.isTrue(confuse(f13) is F13<int>); |
| 655 Expect.isFalse(confuse(f13) is F13<bool>); | 635 Expect.isFalse(confuse(f13) is F13<bool>); |
| 656 Expect.equals(tIsDynamic, m13 is F13<bool>); | 636 Expect.equals(tIsDynamic, m13 is F13<bool>); |
| 657 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); | 637 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); |
| 658 } else { | 638 } else { |
| 659 if (inCheckedMode) { | 639 if (typeAssertionsEnabled) { |
| 660 Expect.throws(() { | 640 Expect.throws(() { |
| 661 x13 = (f13 as dynamic); | 641 x13 = (f13 as dynamic); |
| 662 }); | 642 }); |
| 663 Expect.throws(() { | 643 Expect.throws(() { |
| 664 x13 = confuse(f13); | 644 x13 = confuse(f13); |
| 665 }); | 645 }); |
| 666 core.List<core.int> Function(int x1, | 646 core.List<core.int> Function(int x1, {List<T> x}) |
| 667 {List<T> x}) Function<B extends core.int>(int x) l13; | 647 Function<B extends core.int>(int x) l13; |
| 668 Expect.throws(() { | 648 Expect.throws(() { |
| 669 l13 = (f13 as dynamic); | 649 l13 = (f13 as dynamic); |
| 670 }); | 650 }); |
| 671 Expect.throws(() { | 651 Expect.throws(() { |
| 672 l13 = confuse(f13); | 652 l13 = confuse(f13); |
| 673 }); | 653 }); |
| 674 } | 654 } |
| 675 core.List<core.int> Function(int x1, | 655 core.List<core.int> Function(int x1, {List<T> x}) |
| 676 {List<T> x}) Function<B extends core.int>(int x) l13 = m13; | 656 Function<B extends core.int>(int x) l13 = m13; |
| 677 // In checked mode, verifies the type. | 657 // In checked mode, verifies the type. |
| 678 x13 = m13; | 658 x13 = m13; |
| 679 x13 = confuse(m13); | 659 x13 = confuse(m13); |
| 680 } | 660 } |
| 681 } | 661 } |
| 682 | 662 |
| 683 /// List<T> Function(List<Function> x) Function<B extends core.int>(int x) | 663 /// List<T> Function(List<Function> x) Function<B extends core.int>(int x) |
| 684 void testF14() { | 664 void testF14() { |
| 685 Expect.isTrue(f14 is F14); | 665 Expect.isTrue(f14 is F14); |
| 686 Expect.isTrue(confuse(f14) is F14); | 666 Expect.isTrue(confuse(f14) is F14); |
| 687 // In checked mode, verifies the type. | 667 // In checked mode, verifies the type. |
| 688 List<T> Function(List<Function> x) Function<B extends core.int>(int x) l14; | 668 List<T> Function(List<Function> x) Function<B extends core.int>(int x) l14; |
| 689 // The static function f14 sets `T` to `int`. | 669 // The static function f14 sets `T` to `int`. |
| 690 if (!tIsBool) { | 670 if (!tIsBool) { |
| 691 x14 = f14 as dynamic; | 671 x14 = f14 as dynamic; |
| 692 l14 = f14 as dynamic; | 672 l14 = f14 as dynamic; |
| 693 x14 = confuse(f14); | 673 x14 = confuse(f14); |
| 694 l14 = confuse(f14); | 674 l14 = confuse(f14); |
| 695 } | 675 } |
| 696 | 676 |
| 697 Expect.isTrue(m14 is F14); | 677 Expect.isTrue(m14 is F14); |
| 698 Expect.isTrue(m14 is List<T> Function( | 678 Expect.isTrue(m14 is List<T> Function(List<Function> x) |
| 699 List<Function> x) Function<B extends core.int>(int x)); | 679 Function<B extends core.int>(int x)); |
| 700 Expect.isTrue(confuse(m14) is F14); | 680 Expect.isTrue(confuse(m14) is F14); |
| 701 // In checked mode, verifies the type. | 681 // In checked mode, verifies the type. |
| 702 x14 = m14; | 682 x14 = m14; |
| 703 l14 = m14; | 683 l14 = m14; |
| 704 x14 = confuse(m14); | 684 x14 = confuse(m14); |
| 705 l14 = confuse(m14); | 685 l14 = confuse(m14); |
| 706 if (!tIsBool) { | 686 if (!tIsBool) { |
| 707 Expect.isTrue(f14 is F14<int>); | 687 Expect.isTrue(f14 is F14<int>); |
| 708 Expect.isFalse(f14 is F14<bool>); | 688 Expect.isFalse(f14 is F14<bool>); |
| 709 Expect.isTrue(confuse(f14) is F14<int>); | 689 Expect.isTrue(confuse(f14) is F14<int>); |
| 710 Expect.isFalse(confuse(f14) is F14<bool>); | 690 Expect.isFalse(confuse(f14) is F14<bool>); |
| 711 Expect.equals(tIsDynamic, m14 is F14<bool>); | 691 Expect.equals(tIsDynamic, m14 is F14<bool>); |
| 712 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); | 692 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); |
| 713 } else { | 693 } else { |
| 714 if (inCheckedMode) { | 694 if (typeAssertionsEnabled) { |
| 715 Expect.throws(() { | 695 Expect.throws(() { |
| 716 x14 = (f14 as dynamic); | 696 x14 = (f14 as dynamic); |
| 717 }); | 697 }); |
| 718 Expect.throws(() { | 698 Expect.throws(() { |
| 719 x14 = confuse(f14); | 699 x14 = confuse(f14); |
| 720 }); | 700 }); |
| 721 List<T> Function(List<Function> x) Function<B extends core.int>(int x) | 701 List<T> Function(List<Function> x) Function<B extends core.int>(int x) |
| 722 l14; | 702 l14; |
| 723 Expect.throws(() { | 703 Expect.throws(() { |
| 724 l14 = (f14 as dynamic); | 704 l14 = (f14 as dynamic); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 744 l15; | 724 l15; |
| 745 // The static function f15 sets `T` to `int`. | 725 // The static function f15 sets `T` to `int`. |
| 746 if (!tIsBool) { | 726 if (!tIsBool) { |
| 747 x15 = f15 as dynamic; | 727 x15 = f15 as dynamic; |
| 748 l15 = f15 as dynamic; | 728 l15 = f15 as dynamic; |
| 749 x15 = confuse(f15); | 729 x15 = confuse(f15); |
| 750 l15 = confuse(f15); | 730 l15 = confuse(f15); |
| 751 } | 731 } |
| 752 | 732 |
| 753 Expect.isTrue(m15 is F15); | 733 Expect.isTrue(m15 is F15); |
| 754 Expect.isTrue(m15 is List<T> Function(int y, | 734 Expect.isTrue(m15 is List<T> Function(int y, [List<T> x]) |
| 755 [List<T> x]) Function<B extends core.int>(int x)); | 735 Function<B extends core.int>(int x)); |
| 756 Expect.isTrue(confuse(m15) is F15); | 736 Expect.isTrue(confuse(m15) is F15); |
| 757 // In checked mode, verifies the type. | 737 // In checked mode, verifies the type. |
| 758 x15 = m15; | 738 x15 = m15; |
| 759 l15 = m15; | 739 l15 = m15; |
| 760 x15 = confuse(m15); | 740 x15 = confuse(m15); |
| 761 l15 = confuse(m15); | 741 l15 = confuse(m15); |
| 762 if (!tIsBool) { | 742 if (!tIsBool) { |
| 763 Expect.isTrue(f15 is F15<int>); | 743 Expect.isTrue(f15 is F15<int>); |
| 764 Expect.isFalse(f15 is F15<bool>); | 744 Expect.isFalse(f15 is F15<bool>); |
| 765 Expect.isTrue(confuse(f15) is F15<int>); | 745 Expect.isTrue(confuse(f15) is F15<int>); |
| 766 Expect.isFalse(confuse(f15) is F15<bool>); | 746 Expect.isFalse(confuse(f15) is F15<bool>); |
| 767 Expect.equals(tIsDynamic, m15 is F15<bool>); | 747 Expect.equals(tIsDynamic, m15 is F15<bool>); |
| 768 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); | 748 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); |
| 769 } else { | 749 } else { |
| 770 if (inCheckedMode) { | 750 if (typeAssertionsEnabled) { |
| 771 Expect.throws(() { | 751 Expect.throws(() { |
| 772 x15 = (f15 as dynamic); | 752 x15 = (f15 as dynamic); |
| 773 }); | 753 }); |
| 774 Expect.throws(() { | 754 Expect.throws(() { |
| 775 x15 = confuse(f15); | 755 x15 = confuse(f15); |
| 776 }); | 756 }); |
| 777 List<T> Function(int y, [List<T> x]) Function<B extends core.int>(int x) | 757 List<T> Function(int y, [List<T> x]) Function<B extends core.int>(int x) |
| 778 l15; | 758 l15; |
| 779 Expect.throws(() { | 759 Expect.throws(() { |
| 780 l15 = (f15 as dynamic); | 760 l15 = (f15 as dynamic); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 Function({core.List<core.int> x}) Function<B extends core.int>(int x) l17; | 804 Function({core.List<core.int> x}) Function<B extends core.int>(int x) l17; |
| 825 // The static function f17 sets `T` to `int`. | 805 // The static function f17 sets `T` to `int`. |
| 826 if (!tIsBool) { | 806 if (!tIsBool) { |
| 827 x17 = f17 as dynamic; | 807 x17 = f17 as dynamic; |
| 828 l17 = f17 as dynamic; | 808 l17 = f17 as dynamic; |
| 829 x17 = confuse(f17); | 809 x17 = confuse(f17); |
| 830 l17 = confuse(f17); | 810 l17 = confuse(f17); |
| 831 } | 811 } |
| 832 | 812 |
| 833 Expect.isTrue(m17 is F17); | 813 Expect.isTrue(m17 is F17); |
| 834 Expect.isTrue(m17 is Function( | 814 Expect.isTrue(m17 is Function({core.List<core.int> x}) |
| 835 {core.List<core.int> x}) Function<B extends core.int>(int x)); | 815 Function<B extends core.int>(int x)); |
| 836 Expect.isTrue(confuse(m17) is F17); | 816 Expect.isTrue(confuse(m17) is F17); |
| 837 // In checked mode, verifies the type. | 817 // In checked mode, verifies the type. |
| 838 x17 = m17; | 818 x17 = m17; |
| 839 l17 = m17; | 819 l17 = m17; |
| 840 x17 = confuse(m17); | 820 x17 = confuse(m17); |
| 841 l17 = confuse(m17); | 821 l17 = confuse(m17); |
| 842 } | 822 } |
| 843 | 823 |
| 844 /// void Function(int y, {int x}) Function<B extends core.int>(int x) | 824 /// void Function(int y, {int x}) Function<B extends core.int>(int x) |
| 845 void testF18() { | 825 void testF18() { |
| 846 Expect.isTrue(f18 is F18); | 826 Expect.isTrue(f18 is F18); |
| 847 Expect.isTrue(confuse(f18) is F18); | 827 Expect.isTrue(confuse(f18) is F18); |
| 848 // In checked mode, verifies the type. | 828 // In checked mode, verifies the type. |
| 849 void Function(int y, {int x}) Function<B extends core.int>(int x) l18; | 829 void Function(int y, {int x}) Function<B extends core.int>(int x) l18; |
| 850 // The static function f18 sets `T` to `int`. | 830 // The static function f18 sets `T` to `int`. |
| 851 if (!tIsBool) { | 831 if (!tIsBool) { |
| 852 x18 = f18 as dynamic; | 832 x18 = f18 as dynamic; |
| 853 l18 = f18 as dynamic; | 833 l18 = f18 as dynamic; |
| 854 x18 = confuse(f18); | 834 x18 = confuse(f18); |
| 855 l18 = confuse(f18); | 835 l18 = confuse(f18); |
| 856 } | 836 } |
| 857 | 837 |
| 858 Expect.isTrue(m18 is F18); | 838 Expect.isTrue(m18 is F18); |
| 859 Expect.isTrue(m18 is void Function(int y, | 839 Expect.isTrue(m18 is void Function(int y, {int x}) |
| 860 {int x}) Function<B extends core.int>(int x)); | 840 Function<B extends core.int>(int x)); |
| 861 Expect.isTrue(confuse(m18) is F18); | 841 Expect.isTrue(confuse(m18) is F18); |
| 862 // In checked mode, verifies the type. | 842 // In checked mode, verifies the type. |
| 863 x18 = m18; | 843 x18 = m18; |
| 864 l18 = m18; | 844 l18 = m18; |
| 865 x18 = confuse(m18); | 845 x18 = confuse(m18); |
| 866 l18 = confuse(m18); | 846 l18 = confuse(m18); |
| 867 } | 847 } |
| 868 | 848 |
| 869 /// void Function(int x1, [core.List<core.int> x]) Function<B extends core.int
>(int x) | 849 /// void Function(int x1, [core.List<core.int> x]) Function<B extends core.int
>(int x) |
| 870 void testF19() { | 850 void testF19() { |
| 871 Expect.isTrue(f19 is F19); | 851 Expect.isTrue(f19 is F19); |
| 872 Expect.isTrue(confuse(f19) is F19); | 852 Expect.isTrue(confuse(f19) is F19); |
| 873 // In checked mode, verifies the type. | 853 // In checked mode, verifies the type. |
| 874 void Function(int x1, [core.List<core.int> x]) Function<B extends core.int>( | 854 void Function(int x1, [core.List<core.int> x]) Function<B extends core.int>( |
| 875 int x) l19; | 855 int x) l19; |
| 876 // The static function f19 sets `T` to `int`. | 856 // The static function f19 sets `T` to `int`. |
| 877 if (!tIsBool) { | 857 if (!tIsBool) { |
| 878 x19 = f19 as dynamic; | 858 x19 = f19 as dynamic; |
| 879 l19 = f19 as dynamic; | 859 l19 = f19 as dynamic; |
| 880 x19 = confuse(f19); | 860 x19 = confuse(f19); |
| 881 l19 = confuse(f19); | 861 l19 = confuse(f19); |
| 882 } | 862 } |
| 883 | 863 |
| 884 Expect.isTrue(m19 is F19); | 864 Expect.isTrue(m19 is F19); |
| 885 Expect.isTrue(m19 is void Function(int x1, | 865 Expect.isTrue(m19 is void Function(int x1, [core.List<core.int> x]) |
| 886 [core.List<core.int> x]) Function<B extends core.int>(int x)); | 866 Function<B extends core.int>(int x)); |
| 887 Expect.isTrue(confuse(m19) is F19); | 867 Expect.isTrue(confuse(m19) is F19); |
| 888 // In checked mode, verifies the type. | 868 // In checked mode, verifies the type. |
| 889 x19 = m19; | 869 x19 = m19; |
| 890 l19 = m19; | 870 l19 = m19; |
| 891 x19 = confuse(m19); | 871 x19 = confuse(m19); |
| 892 l19 = confuse(m19); | 872 l19 = confuse(m19); |
| 893 } | 873 } |
| 894 | 874 |
| 895 /// int Function<A>(List<T> x) Function<B extends core.int>(int x) | 875 /// int Function<A>(List<T> x) Function<B extends core.int>(int x) |
| 896 void testF20() { | 876 void testF20() { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 916 x20 = confuse(m20); | 896 x20 = confuse(m20); |
| 917 l20 = confuse(m20); | 897 l20 = confuse(m20); |
| 918 if (!tIsBool) { | 898 if (!tIsBool) { |
| 919 Expect.isTrue(f20 is F20<int>); | 899 Expect.isTrue(f20 is F20<int>); |
| 920 Expect.isFalse(f20 is F20<bool>); | 900 Expect.isFalse(f20 is F20<bool>); |
| 921 Expect.isTrue(confuse(f20) is F20<int>); | 901 Expect.isTrue(confuse(f20) is F20<int>); |
| 922 Expect.isFalse(confuse(f20) is F20<bool>); | 902 Expect.isFalse(confuse(f20) is F20<bool>); |
| 923 Expect.equals(tIsDynamic, m20 is F20<bool>); | 903 Expect.equals(tIsDynamic, m20 is F20<bool>); |
| 924 Expect.equals(tIsDynamic, confuse(m20) is F20<bool>); | 904 Expect.equals(tIsDynamic, confuse(m20) is F20<bool>); |
| 925 } else { | 905 } else { |
| 926 if (inCheckedMode) { | 906 if (typeAssertionsEnabled) { |
| 927 Expect.throws(() { | 907 Expect.throws(() { |
| 928 x20 = (f20 as dynamic); | 908 x20 = (f20 as dynamic); |
| 929 }); | 909 }); |
| 930 Expect.throws(() { | 910 Expect.throws(() { |
| 931 x20 = confuse(f20); | 911 x20 = confuse(f20); |
| 932 }); | 912 }); |
| 933 int Function<A>(List<T> x) Function<B extends core.int>(int x) l20; | 913 int Function<A>(List<T> x) Function<B extends core.int>(int x) l20; |
| 934 Expect.throws(() { | 914 Expect.throws(() { |
| 935 l20 = (f20 as dynamic); | 915 l20 = (f20 as dynamic); |
| 936 }); | 916 }); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 953 core.List<core.int> Function<A>() Function<B extends core.int>(int x) l21; | 933 core.List<core.int> Function<A>() Function<B extends core.int>(int x) l21; |
| 954 // The static function f21 sets `T` to `int`. | 934 // The static function f21 sets `T` to `int`. |
| 955 if (!tIsBool) { | 935 if (!tIsBool) { |
| 956 x21 = f21 as dynamic; | 936 x21 = f21 as dynamic; |
| 957 l21 = f21 as dynamic; | 937 l21 = f21 as dynamic; |
| 958 x21 = confuse(f21); | 938 x21 = confuse(f21); |
| 959 l21 = confuse(f21); | 939 l21 = confuse(f21); |
| 960 } | 940 } |
| 961 | 941 |
| 962 Expect.isTrue(m21 is F21); | 942 Expect.isTrue(m21 is F21); |
| 963 Expect.isTrue(m21 is core | 943 Expect.isTrue(m21 is core.List<core.int> Function<A>() |
| 964 .List<core.int> Function<A>() Function<B extends core.int>(int x)); | 944 Function<B extends core.int>(int x)); |
| 965 Expect.isTrue(confuse(m21) is F21); | 945 Expect.isTrue(confuse(m21) is F21); |
| 966 // In checked mode, verifies the type. | 946 // In checked mode, verifies the type. |
| 967 x21 = m21; | 947 x21 = m21; |
| 968 l21 = m21; | 948 l21 = m21; |
| 969 x21 = confuse(m21); | 949 x21 = confuse(m21); |
| 970 l21 = confuse(m21); | 950 l21 = confuse(m21); |
| 971 } | 951 } |
| 972 | 952 |
| 973 /// A Function<A>(A x) Function<B extends core.int>(int x) | 953 /// A Function<A>(A x) Function<B extends core.int>(int x) |
| 974 void testF22() { | 954 void testF22() { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 994 x22 = confuse(m22); | 974 x22 = confuse(m22); |
| 995 l22 = confuse(m22); | 975 l22 = confuse(m22); |
| 996 } | 976 } |
| 997 } | 977 } |
| 998 | 978 |
| 999 void main() { | 979 void main() { |
| 1000 new U51().runTests(); | 980 new U51().runTests(); |
| 1001 new U51<int>(tIsInt: true).runTests(); | 981 new U51<int>(tIsInt: true).runTests(); |
| 1002 new U51<bool>(tIsBool: true).runTests(); | 982 new U51<bool>(tIsBool: true).runTests(); |
| 1003 } | 983 } |
| OLD | NEW |