| Index: tests/language/function_type/function_type44_test.dart
|
| diff --git a/tests/language/function_type/function_type44_test.dart b/tests/language/function_type/function_type44_test.dart
|
| index a3b07d3a8a2be8481356be56cdc92acddd49c807..17503153e9283c700854c34fd828f441324ce4cd 100644
|
| --- a/tests/language/function_type/function_type44_test.dart
|
| +++ b/tests/language/function_type/function_type44_test.dart
|
| @@ -19,60 +19,31 @@ 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(List<T> x);
|
| -typedef F1<T>
|
| - = List<Function> Function(int y, {List<Function> x});
|
| -typedef F2<T>
|
| - = List<T> Function(int x0, {Function x});
|
| -typedef F3<T>
|
| - = void Function({int x});
|
| -typedef F4<T>
|
| - = A Function<A>(List<T> x);
|
| -typedef F5<T>
|
| - = int Function(int x0, {Function x}) Function();
|
| -typedef F6<T>
|
| - = int Function([List<T> x]) Function();
|
| -typedef F7<T>
|
| - = Function Function(int y, [Function x]) Function();
|
| -typedef F8<T>
|
| - = Function Function(int x1, [core.List<core.int> x2]) Function();
|
| -typedef F9<T>
|
| - = List<Function> Function({int x}) Function();
|
| -typedef F10<T>
|
| - = List<Function> Function(core.List<core.int> x) Function();
|
| -typedef F11<T>
|
| - = core.List<core.int> Function(int x0, [int x]) Function();
|
| -typedef F12<T>
|
| - = core.List<core.int> Function([List<Function> x1]) Function();
|
| -typedef F13<T>
|
| - = core.List<core.int> Function({List<T> x}) Function();
|
| -typedef F14<T>
|
| - = List<T> Function(int y, {Function x}) Function();
|
| -typedef F15<T>
|
| - = List<T> Function(int x0, [List<T> x]) Function();
|
| -typedef F16<T>
|
| - = Function(Function x0) Function();
|
| -typedef F17<T>
|
| - = Function(int x, [core.List<core.int> x2]) Function();
|
| -typedef F18<T>
|
| - = void Function(int x0, {int x}) Function();
|
| -typedef F19<T>
|
| - = void Function([core.List<core.int> x]) Function();
|
| -typedef F20<T>
|
| - = int Function<A>(core.List<core.int> x) Function();
|
| -typedef F21<T>
|
| - = core.List<core.int> Function<A>(List<T> x) Function();
|
| -typedef F22<T>
|
| - = A Function<A>() Function();
|
| -typedef F23<T>
|
| - = B Function(core.List<core.int> x) Function<B extends core.int>();
|
| +typedef F0<T> = int Function(List<T> x);
|
| +typedef F1<T> = List<Function> Function(int y, {List<Function> x});
|
| +typedef F2<T> = List<T> Function(int x0, {Function x});
|
| +typedef F3<T> = void Function({int x});
|
| +typedef F4<T> = A Function<A>(List<T> x);
|
| +typedef F5<T> = int Function(int x0, {Function x}) Function();
|
| +typedef F6<T> = int Function([List<T> x]) Function();
|
| +typedef F7<T> = Function Function(int y, [Function x]) Function();
|
| +typedef F8<T> = Function Function(int x1, [core.List<core.int> x2]) Function();
|
| +typedef F9<T> = List<Function> Function({int x}) Function();
|
| +typedef F10<T> = List<Function> Function(core.List<core.int> x) Function();
|
| +typedef F11<T> = core.List<core.int> Function(int x0, [int x]) Function();
|
| +typedef F12<T> = core.List<core.int> Function([List<Function> x1]) Function();
|
| +typedef F13<T> = core.List<core.int> Function({List<T> x}) Function();
|
| +typedef F14<T> = List<T> Function(int y, {Function x}) Function();
|
| +typedef F15<T> = List<T> Function(int x0, [List<T> x]) Function();
|
| +typedef F16<T> = Function(Function x0) Function();
|
| +typedef F17<T> = Function(int x, [core.List<core.int> x2]) Function();
|
| +typedef F18<T> = void Function(int x0, {int x}) Function();
|
| +typedef F19<T> = void Function([core.List<core.int> x]) Function();
|
| +typedef F20<T> = int Function<A>(core.List<core.int> x) Function();
|
| +typedef F21<T> = core.List<core.int> Function<A>(List<T> x) Function();
|
| +typedef F22<T> = A Function<A>() Function();
|
| +typedef F23<T> = B Function(core.List<core.int> x)
|
| + Function<B extends core.int>();
|
|
|
| int f0(List<int> x) => null;
|
| List<Function> f1(int y, {List<Function> x}) => null;
|
| @@ -214,7 +185,7 @@ class U44<T> {
|
| Expect.equals(tIsDynamic, m0 is F0<bool>);
|
| Expect.equals(tIsDynamic, confuse(m0) is F0<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x0 = (f0 as dynamic);
|
| });
|
| @@ -290,7 +261,7 @@ class U44<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);
|
| });
|
| @@ -366,7 +337,7 @@ class U44<T> {
|
| Expect.equals(tIsDynamic, m4 is F4<bool>);
|
| Expect.equals(tIsDynamic, confuse(m4) is F4<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x4 = (f4 as dynamic);
|
| });
|
| @@ -442,7 +413,7 @@ class U44<T> {
|
| Expect.equals(tIsDynamic, m6 is F6<bool>);
|
| Expect.equals(tIsDynamic, confuse(m6) is F6<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x6 = (f6 as dynamic);
|
| });
|
| @@ -642,7 +613,7 @@ class U44<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);
|
| });
|
| @@ -694,7 +665,7 @@ class U44<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);
|
| });
|
| @@ -746,7 +717,7 @@ class U44<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);
|
| });
|
| @@ -918,7 +889,7 @@ class U44<T> {
|
| Expect.equals(tIsDynamic, m21 is F21<bool>);
|
| Expect.equals(tIsDynamic, confuse(m21) is F21<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x21 = (f21 as dynamic);
|
| });
|
| @@ -979,8 +950,8 @@ class U44<T> {
|
| }
|
|
|
| Expect.isTrue(m23 is F23);
|
| - Expect.isTrue(m23 is B Function(
|
| - core.List<core.int> x) Function<B extends core.int>());
|
| + Expect.isTrue(m23 is B Function(core.List<core.int> x)
|
| + Function<B extends core.int>());
|
| Expect.isTrue(confuse(m23) is F23);
|
| // In checked mode, verifies the type.
|
| x23 = m23;
|
|
|