| Index: tests/language/function_type/function_type34_test.dart
|
| diff --git a/tests/language/function_type/function_type34_test.dart b/tests/language/function_type/function_type34_test.dart
|
| index ccc98af01ca43bafcda452e9846a124945a9b553..ed367a357589e6d8d9fda048cbe47c51c4946b80 100644
|
| --- a/tests/language/function_type/function_type34_test.dart
|
| +++ b/tests/language/function_type/function_type34_test.dart
|
| @@ -19,66 +19,42 @@ import 'package:expect/expect.dart';
|
| @AssumeDynamic()
|
| confuse(f) => f;
|
|
|
| -final bool inCheckedMode = (() {
|
| - bool result = false;
|
| - assert(result = true);
|
| - return result;
|
| -})();
|
| -
|
| -typedef F0<T>
|
| - = int Function([core.List<core.int> x]);
|
| -typedef F1<T>
|
| - = List<Function> Function(List<Function> x);
|
| -typedef F2<T>
|
| - = List<T> Function(int y, {int x});
|
| -typedef F3<T>
|
| - = Function(int y, {List<T> x});
|
| -typedef F4<T>
|
| - = Function<A>(List<Function> x);
|
| -typedef F5<T>
|
| - = int Function(int x2, [Function x3]) Function<B extends core.int>();
|
| -typedef F6<T>
|
| - = int Function(int x1,
|
| - {core.List<core.int> x}) Function<B extends core.int>();
|
| -typedef F7<T>
|
| - = Function Function(Function x) Function<B extends core.int>();
|
| -typedef F8<T>
|
| - = Function Function(int y,
|
| - [core.List<core.int> x]) Function<B extends core.int>();
|
| -typedef F9<T>
|
| - = List<Function> Function([int x1]) Function<B extends core.int>();
|
| -typedef F10<T>
|
| - = List<Function> Function(
|
| - {List<Function> x}) Function<B extends core.int>();
|
| -typedef F11<T>
|
| - = List<Function> Function() Function<B extends core.int>();
|
| -typedef F12<T>
|
| - = core.List<core.int> Function(int x1,
|
| - [List<Function> x]) Function<B extends core.int>();
|
| -typedef F13<T>
|
| - = core.List<core.int> Function([List<T> x1]) Function<B extends core.int>();
|
| -typedef F14<T>
|
| - = List<T> Function(int x, [Function x1]) Function<B extends core.int>();
|
| -typedef F15<T>
|
| - = List<T> Function(int y,
|
| - {core.List<core.int> x}) Function<B extends core.int>();
|
| -typedef F16<T>
|
| - = Function([Function x]) Function<B extends core.int>();
|
| -typedef F17<T>
|
| - = Function(core.List<core.int> x1) Function<B extends core.int>();
|
| -typedef F18<T>
|
| - = void Function(int x2, [int x3]) Function<B extends core.int>();
|
| -typedef F19<T>
|
| - = void Function(int x1, {List<Function> x}) Function<B extends core.int>();
|
| -typedef F20<T>
|
| - = int Function<A>(int x) Function<B extends core.int>();
|
| -typedef F21<T>
|
| - = core.List<core.int> Function<A>(
|
| - Function x) Function<B extends core.int>();
|
| -typedef F22<T>
|
| - = A Function<A>(List<Function> x) Function<B extends core.int>();
|
| -typedef F23<T>
|
| - = List<B> Function(B x) Function<B extends core.int>();
|
| +typedef F0<T> = int Function([core.List<core.int> x]);
|
| +typedef F1<T> = List<Function> Function(List<Function> x);
|
| +typedef F2<T> = List<T> Function(int y, {int x});
|
| +typedef F3<T> = Function(int y, {List<T> x});
|
| +typedef F4<T> = Function<A>(List<Function> x);
|
| +typedef F5<T> = int Function(int x2, [Function x3])
|
| + Function<B extends core.int>();
|
| +typedef F6<T> = int Function(int x1, {core.List<core.int> x})
|
| + Function<B extends core.int>();
|
| +typedef F7<T> = Function Function(Function x) Function<B extends core.int>();
|
| +typedef F8<T> = Function Function(int y, [core.List<core.int> x])
|
| + Function<B extends core.int>();
|
| +typedef F9<T> = List<Function> Function([int x1])
|
| + Function<B extends core.int>();
|
| +typedef F10<T> = List<Function> Function({List<Function> x})
|
| + Function<B extends core.int>();
|
| +typedef F11<T> = List<Function> Function() Function<B extends core.int>();
|
| +typedef F12<T> = core.List<core.int> Function(int x1, [List<Function> x])
|
| + Function<B extends core.int>();
|
| +typedef F13<T> = core.List<core.int> Function([List<T> x1])
|
| + Function<B extends core.int>();
|
| +typedef F14<T> = List<T> Function(int x, [Function x1])
|
| + Function<B extends core.int>();
|
| +typedef F15<T> = List<T> Function(int y, {core.List<core.int> x})
|
| + Function<B extends core.int>();
|
| +typedef F16<T> = Function([Function x]) Function<B extends core.int>();
|
| +typedef F17<T> = Function(core.List<core.int> x1)
|
| + Function<B extends core.int>();
|
| +typedef F18<T> = void Function(int x2, [int x3]) Function<B extends core.int>();
|
| +typedef F19<T> = void Function(int x1, {List<Function> x})
|
| + Function<B extends core.int>();
|
| +typedef F20<T> = int Function<A>(int x) Function<B extends core.int>();
|
| +typedef F21<T> = core.List<core.int> Function<A>(Function x)
|
| + Function<B extends core.int>();
|
| +typedef F22<T> = A Function<A>(List<Function> x) Function<B extends core.int>();
|
| +typedef F23<T> = List<B> Function(B x) Function<B extends core.int>();
|
|
|
| int f0([core.List<core.int> x]) => null;
|
| List<Function> f1(List<Function> x) => null;
|
| @@ -122,18 +98,18 @@ class U34<T> {
|
| int Function(int x1, {core.List<core.int> x}) Function<B extends core.int>()
|
| x6;
|
| Function Function(Function x) Function<B extends core.int>() x7;
|
| - Function Function(int y,
|
| - [core.List<core.int> x]) Function<B extends core.int>() x8;
|
| + Function Function(int y, [core.List<core.int> x])
|
| + Function<B extends core.int>() x8;
|
| List<Function> Function([int x1]) Function<B extends core.int>() x9;
|
| List<Function> Function({List<Function> x}) Function<B extends core.int>()
|
| x10;
|
| List<Function> Function() Function<B extends core.int>() x11;
|
| - core.List<core.int> Function(int x1,
|
| - [List<Function> x]) Function<B extends core.int>() x12;
|
| + core.List<core.int> Function(int x1, [List<Function> x])
|
| + Function<B extends core.int>() x12;
|
| core.List<core.int> Function([List<T> x1]) Function<B extends core.int>() x13;
|
| List<T> Function(int x, [Function x1]) Function<B extends core.int>() x14;
|
| - List<T> Function(int y,
|
| - {core.List<core.int> x}) Function<B extends core.int>() x15;
|
| + List<T> Function(int y, {core.List<core.int> x})
|
| + Function<B extends core.int>() x15;
|
| Function([Function x]) Function<B extends core.int>() x16;
|
| Function(core.List<core.int> x1) Function<B extends core.int>() x17;
|
| void Function(int x2, [int x3]) Function<B extends core.int>() x18;
|
| @@ -281,7 +257,7 @@ class U34<T> {
|
| Expect.equals(tIsDynamic, m2 is F2<bool>);
|
| Expect.equals(tIsDynamic, confuse(m2) is F2<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x2 = (f2 as dynamic);
|
| });
|
| @@ -333,7 +309,7 @@ class U34<T> {
|
| Expect.equals(tIsDynamic, m3 is F3<bool>);
|
| Expect.equals(tIsDynamic, confuse(m3) is F3<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x3 = (f3 as dynamic);
|
| });
|
| @@ -394,8 +370,8 @@ class U34<T> {
|
| }
|
|
|
| Expect.isTrue(m5 is F5);
|
| - Expect.isTrue(m5 is int Function(int x2,
|
| - [Function x3]) Function<B extends core.int>());
|
| + Expect.isTrue(m5 is int Function(int x2, [Function x3])
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m5) is F5);
|
| // In checked mode, verifies the type.
|
| x5 = m5;
|
| @@ -420,8 +396,8 @@ class U34<T> {
|
| }
|
|
|
| Expect.isTrue(m6 is F6);
|
| - Expect.isTrue(m6 is int Function(int x1,
|
| - {core.List<core.int> x}) Function<B extends core.int>());
|
| + Expect.isTrue(m6 is int Function(int x1, {core.List<core.int> x})
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m6) is F6);
|
| // In checked mode, verifies the type.
|
| x6 = m6;
|
| @@ -460,8 +436,8 @@ class U34<T> {
|
| Expect.isTrue(f8 is F8);
|
| Expect.isTrue(confuse(f8) is F8);
|
| // In checked mode, verifies the type.
|
| - Function Function(int y,
|
| - [core.List<core.int> x]) Function<B extends core.int>() l8;
|
| + Function Function(int y, [core.List<core.int> x])
|
| + Function<B extends core.int>() l8;
|
| // The static function f8 sets `T` to `int`.
|
| if (!tIsBool) {
|
| x8 = f8 as dynamic;
|
| @@ -471,8 +447,8 @@ class U34<T> {
|
| }
|
|
|
| Expect.isTrue(m8 is F8);
|
| - Expect.isTrue(m8 is Function Function(int y,
|
| - [core.List<core.int> x]) Function<B extends core.int>());
|
| + Expect.isTrue(m8 is Function Function(int y, [core.List<core.int> x])
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m8) is F8);
|
| // In checked mode, verifies the type.
|
| x8 = m8;
|
| @@ -522,8 +498,8 @@ class U34<T> {
|
| }
|
|
|
| Expect.isTrue(m10 is F10);
|
| - Expect.isTrue(m10 is List<Function> Function(
|
| - {List<Function> x}) Function<B extends core.int>());
|
| + Expect.isTrue(m10 is List<Function> Function({List<Function> x})
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m10) is F10);
|
| // In checked mode, verifies the type.
|
| x10 = m10;
|
| @@ -562,8 +538,8 @@ class U34<T> {
|
| Expect.isTrue(f12 is F12);
|
| Expect.isTrue(confuse(f12) is F12);
|
| // In checked mode, verifies the type.
|
| - core.List<core.int> Function(int x1,
|
| - [List<Function> x]) Function<B extends core.int>() l12;
|
| + core.List<core.int> Function(int x1, [List<Function> x])
|
| + Function<B extends core.int>() l12;
|
| // The static function f12 sets `T` to `int`.
|
| if (!tIsBool) {
|
| x12 = f12 as dynamic;
|
| @@ -574,7 +550,8 @@ class U34<T> {
|
|
|
| Expect.isTrue(m12 is F12);
|
| Expect.isTrue(m12 is core.List<core.int> Function(int x1,
|
| - [List<Function> x]) Function<B extends core.int>());
|
| + [List<Function> x])
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m12) is F12);
|
| // In checked mode, verifies the type.
|
| x12 = m12;
|
| @@ -599,8 +576,8 @@ class U34<T> {
|
| }
|
|
|
| Expect.isTrue(m13 is F13);
|
| - Expect.isTrue(m13 is core.List<core.int> Function(
|
| - [List<T> x1]) Function<B extends core.int>());
|
| + Expect.isTrue(m13 is core.List<core.int> Function([List<T> x1])
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m13) is F13);
|
| // In checked mode, verifies the type.
|
| x13 = m13;
|
| @@ -615,15 +592,15 @@ class U34<T> {
|
| Expect.equals(tIsDynamic, m13 is F13<bool>);
|
| Expect.equals(tIsDynamic, confuse(m13) is F13<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x13 = (f13 as dynamic);
|
| });
|
| Expect.throws(() {
|
| x13 = confuse(f13);
|
| });
|
| - core.List<core.int> Function(
|
| - [List<T> x1]) Function<B extends core.int>() l13;
|
| + core.List<core.int> Function([List<T> x1])
|
| + Function<B extends core.int>() l13;
|
| Expect.throws(() {
|
| l13 = (f13 as dynamic);
|
| });
|
| @@ -654,8 +631,8 @@ class U34<T> {
|
| }
|
|
|
| Expect.isTrue(m14 is F14);
|
| - Expect.isTrue(m14 is List<T> Function(int x,
|
| - [Function x1]) Function<B extends core.int>());
|
| + Expect.isTrue(m14 is List<T> Function(int x, [Function x1])
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m14) is F14);
|
| // In checked mode, verifies the type.
|
| x14 = m14;
|
| @@ -670,7 +647,7 @@ class U34<T> {
|
| Expect.equals(tIsDynamic, m14 is F14<bool>);
|
| Expect.equals(tIsDynamic, confuse(m14) is F14<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x14 = (f14 as dynamic);
|
| });
|
| @@ -699,8 +676,8 @@ class U34<T> {
|
| Expect.isTrue(f15 is F15);
|
| Expect.isTrue(confuse(f15) is F15);
|
| // In checked mode, verifies the type.
|
| - List<T> Function(int y,
|
| - {core.List<core.int> x}) Function<B extends core.int>() l15;
|
| + List<T> Function(int y, {core.List<core.int> x})
|
| + Function<B extends core.int>() l15;
|
| // The static function f15 sets `T` to `int`.
|
| if (!tIsBool) {
|
| x15 = f15 as dynamic;
|
| @@ -710,8 +687,8 @@ class U34<T> {
|
| }
|
|
|
| Expect.isTrue(m15 is F15);
|
| - Expect.isTrue(m15 is List<T> Function(int y,
|
| - {core.List<core.int> x}) Function<B extends core.int>());
|
| + Expect.isTrue(m15 is List<T> Function(int y, {core.List<core.int> x})
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m15) is F15);
|
| // In checked mode, verifies the type.
|
| x15 = m15;
|
| @@ -726,15 +703,15 @@ class U34<T> {
|
| Expect.equals(tIsDynamic, m15 is F15<bool>);
|
| Expect.equals(tIsDynamic, confuse(m15) is F15<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x15 = (f15 as dynamic);
|
| });
|
| Expect.throws(() {
|
| x15 = confuse(f15);
|
| });
|
| - List<T> Function(int y,
|
| - {core.List<core.int> x}) Function<B extends core.int>() l15;
|
| + List<T> Function(int y, {core.List<core.int> x})
|
| + Function<B extends core.int>() l15;
|
| Expect.throws(() {
|
| l15 = (f15 as dynamic);
|
| });
|
| @@ -742,8 +719,8 @@ class U34<T> {
|
| l15 = confuse(f15);
|
| });
|
| }
|
| - List<T> Function(int y,
|
| - {core.List<core.int> x}) Function<B extends core.int>() l15 = m15;
|
| + List<T> Function(int y, {core.List<core.int> x})
|
| + Function<B extends core.int>() l15 = m15;
|
| // In checked mode, verifies the type.
|
| x15 = m15;
|
| x15 = confuse(m15);
|
| @@ -840,8 +817,8 @@ class U34<T> {
|
| }
|
|
|
| Expect.isTrue(m19 is F19);
|
| - Expect.isTrue(m19 is void Function(int x1,
|
| - {List<Function> x}) Function<B extends core.int>());
|
| + Expect.isTrue(m19 is void Function(int x1, {List<Function> x})
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m19) is F19);
|
| // In checked mode, verifies the type.
|
| x19 = m19;
|
| @@ -890,8 +867,8 @@ class U34<T> {
|
| }
|
|
|
| Expect.isTrue(m21 is F21);
|
| - Expect.isTrue(m21 is core.List<core.int> Function<A>(
|
| - Function x) Function<B extends core.int>());
|
| + Expect.isTrue(m21 is core.List<core.int> Function<A>(Function x)
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m21) is F21);
|
| // In checked mode, verifies the type.
|
| x21 = m21;
|
|
|