Skip to content

Commit dce29c6

Browse files
committed
Revert "Make sure we expect type exception in checked mode"
This reverts commit c6cf7f7. I didn't intend to push straight into master, instead wanted to have PR created for this first.
1 parent c6cf7f7 commit dce29c6

6 files changed

+14
-33
lines changed

Language/Expressions/Function_Expressions/static_type_dynamic_async_t03.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,11 @@
1616
* @static-warning
1717
1818
*/
19-
import '../../../Utils/dynamic_check.dart';
2019

2120
typedef int futureFuncParam(int p1, [int p2]);
2221

2322
main() {
24-
checkTypeError(() {
25-
futureFuncParam ffp1 =
26-
(int p1, [int p2]) async {return 5;}; /// static type warning
27-
ffp1(3);
28-
});
23+
futureFuncParam ffp1 =
24+
(int p1, [int p2]) async {return 5;}; /// static type warning
25+
ffp1(3);
2926
}

Language/Expressions/Function_Expressions/static_type_dynamic_asyncs_t03.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@
1717
1818
*/
1919
import 'dart:async';
20-
import '../../../Utils/dynamic_check.dart';
2120

2221
typedef Future streamFuncParam(int p1, [bool p2]);
2322

2423
main() {
25-
checkTypeError(() {
26-
streamFuncParam sfp1 = (int p1, [bool p2]) async* {}; /// static type warning
27-
sfp1(1);
28-
});
24+
streamFuncParam sfp1 = (int p1, [bool p2]) async* {}; /// static type warning
25+
sfp1(1);
2926
}

Language/Expressions/Function_Expressions/static_type_dynamic_syncs_t03.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@
1717
1818
*/
1919
import 'dart:async';
20-
import '../../../Utils/dynamic_check.dart';
2120

2221
typedef Future iterFuncParam(int p1, [List p2]);
2322

2423
main() {
25-
checkTypeError(() {
26-
iterFuncParam ifp1 = (int p1, [List p2]) sync* {}; /// static type warning
27-
ifp1(6);
28-
});
24+
iterFuncParam ifp1 = (int p1, [List p2]) sync* {}; /// static type warning
25+
ifp1(6);
2926
}

Language/Expressions/Function_Expressions/static_type_form_3_async_t03.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,11 @@
1616
* @static-warning
1717
1818
*/
19-
import '../../../Utils/dynamic_check.dart';
2019

2120
typedef int futureFunc(int p1, {int p2});
2221

2322
main() {
24-
checkTypeError(() {
25-
futureFunc ff1 =
26-
(int p1, {int p2}) async {return 2;}; /// static type warning
27-
ff1(1, p2:3);
28-
});
23+
futureFunc ff1 =
24+
(int p1, {int p2}) async {return 2;}; /// static type warning
25+
ff1(1, p2:3);
2926
}

Language/Expressions/Function_Expressions/static_type_form_3_asyncs_t03.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@
1818
*/
1919
import 'dart:async';
2020

21-
import '../../../Utils/dynamic_check.dart';
22-
2321
typedef Future funcParam(int p1, {bool p2});
2422

2523
main() {
26-
checkTypeError(() {
27-
funcParam sfp1 = (int p1, {bool p2}) async* {};
28-
sfp1(2);
29-
});
24+
funcParam sfp1 = (int p1, {bool p2}) async* {};
25+
sfp1(2);
3026
}

Language/Expressions/Function_Expressions/static_type_form_3_syncs_t03.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@
1717
1818
*/
1919
import 'dart:async';
20-
import '../../../Utils/dynamic_check.dart';
2120

2221
typedef Future iterFuncParam(List p1, {List p2});
2322

2423
main() {
25-
checkTypeError(() {
26-
iterFuncParam ifp1 = (List p1, {List p2}) sync* {}; /// static type warning
27-
ifp1([]);
28-
});
24+
iterFuncParam ifp1 = (List p1, {List p2}) sync* {}; /// static type warning
25+
ifp1([]);
2926
}

0 commit comments

Comments
 (0)