| Index: tests/language/function_type/function_type48_test.dart
|
| diff --git a/tests/language/function_type/function_type48_test.dart b/tests/language/function_type/function_type48_test.dart
|
| index 42aae30bb6628a0f1ac79db338d254bc37be93b7..8fa05fdb975b084df0b2b83cb6441bb91e1951b8 100644
|
| --- a/tests/language/function_type/function_type48_test.dart
|
| +++ b/tests/language/function_type/function_type48_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> x0);
|
| -typedef F1<T>
|
| - = List<Function> Function(int y, [core.List<core.int> x]);
|
| -typedef F2<T>
|
| - = List<T> Function(int x0, [List<Function> x]);
|
| -typedef F3<T>
|
| - = void Function([Function x]);
|
| -typedef F4<T>
|
| - = List<A> Function<A>(int x);
|
| -typedef F5<T>
|
| - = int Function(int y, {Function x}) Function();
|
| -typedef F6<T>
|
| - = int Function(int x0, [List<T> x]) Function();
|
| -typedef F7<T>
|
| - = Function Function(Function x0) Function();
|
| -typedef F8<T>
|
| - = Function Function(int x, [core.List<core.int> x2]) Function();
|
| -typedef F9<T>
|
| - = List<Function> Function(int x0, {int x}) Function();
|
| -typedef F10<T>
|
| - = List<Function> Function([core.List<core.int> x]) Function();
|
| -typedef F11<T>
|
| - = core.List<core.int> Function(int y, [int x]) Function();
|
| -typedef F12<T>
|
| - = core.List<core.int> Function(int x1, [List<Function> x2]) Function();
|
| -typedef F13<T>
|
| - = core.List<core.int> Function(int x0, {List<T> x}) Function();
|
| -typedef F14<T>
|
| - = List<T> Function(List<Function> x) Function();
|
| -typedef F15<T>
|
| - = List<T> Function(int y, [List<T> x]) Function();
|
| -typedef F16<T>
|
| - = Function([Function x1]) Function();
|
| -typedef F17<T>
|
| - = Function({core.List<core.int> x}) Function();
|
| -typedef F18<T>
|
| - = void Function(int y, {int x}) Function();
|
| -typedef F19<T>
|
| - = void Function(int x0, [core.List<core.int> x]) Function();
|
| -typedef F20<T>
|
| - = int Function<A>(List<T> x) Function();
|
| -typedef F21<T>
|
| - = core.List<core.int> Function<A>() Function();
|
| -typedef F22<T>
|
| - = A Function<A>(A x) Function();
|
| -typedef F23<T>
|
| - = B Function() Function<B extends core.int>();
|
| +typedef F0<T> = int Function(List<T> x0);
|
| +typedef F1<T> = List<Function> Function(int y, [core.List<core.int> x]);
|
| +typedef F2<T> = List<T> Function(int x0, [List<Function> x]);
|
| +typedef F3<T> = void Function([Function x]);
|
| +typedef F4<T> = List<A> Function<A>(int x);
|
| +typedef F5<T> = int Function(int y, {Function x}) Function();
|
| +typedef F6<T> = int Function(int x0, [List<T> x]) Function();
|
| +typedef F7<T> = Function Function(Function x0) Function();
|
| +typedef F8<T> = Function Function(int x, [core.List<core.int> x2]) Function();
|
| +typedef F9<T> = List<Function> Function(int x0, {int x}) Function();
|
| +typedef F10<T> = List<Function> Function([core.List<core.int> x]) Function();
|
| +typedef F11<T> = core.List<core.int> Function(int y, [int x]) Function();
|
| +typedef F12<T> = core.List<core.int> Function(int x1, [List<Function> x2])
|
| + Function();
|
| +typedef F13<T> = core.List<core.int> Function(int x0, {List<T> x}) Function();
|
| +typedef F14<T> = List<T> Function(List<Function> x) Function();
|
| +typedef F15<T> = List<T> Function(int y, [List<T> x]) Function();
|
| +typedef F16<T> = Function([Function x1]) Function();
|
| +typedef F17<T> = Function({core.List<core.int> x}) Function();
|
| +typedef F18<T> = void Function(int y, {int x}) Function();
|
| +typedef F19<T> = void Function(int x0, [core.List<core.int> x]) Function();
|
| +typedef F20<T> = int Function<A>(List<T> x) Function();
|
| +typedef F21<T> = core.List<core.int> Function<A>() Function();
|
| +typedef F22<T> = A Function<A>(A x) Function();
|
| +typedef F23<T> = B Function() Function<B extends core.int>();
|
|
|
| int f0(List<int> x0) => null;
|
| List<Function> f1(int y, [core.List<core.int> x]) => null;
|
| @@ -214,7 +185,7 @@ class U48<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);
|
| });
|
| @@ -291,7 +262,7 @@ class U48<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);
|
| });
|
| @@ -415,7 +386,7 @@ class U48<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);
|
| });
|
| @@ -576,7 +547,8 @@ class U48<T> {
|
|
|
| Expect.isTrue(m12 is F12);
|
| Expect.isTrue(m12 is core.List<core.int> Function(int x1,
|
| - [List<Function> x2]) Function());
|
| + [List<Function> x2])
|
| + Function());
|
| Expect.isTrue(confuse(m12) is F12);
|
| // In checked mode, verifies the type.
|
| x12 = m12;
|
| @@ -616,7 +588,7 @@ class U48<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);
|
| });
|
| @@ -668,7 +640,7 @@ class U48<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);
|
| });
|
| @@ -720,7 +692,7 @@ class U48<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);
|
| });
|
| @@ -869,7 +841,7 @@ class U48<T> {
|
| Expect.equals(tIsDynamic, m20 is F20<bool>);
|
| Expect.equals(tIsDynamic, confuse(m20) is F20<bool>);
|
| } else {
|
| - if (inCheckedMode) {
|
| + if (typeAssertionsEnabled) {
|
| Expect.throws(() {
|
| x20 = (f20 as dynamic);
|
| });
|
|
|