Sign in
dart
/
sdk.git
/
refs/tags/2.13.0-124.0.dev
/
.
/
tests
/
language
/
function_subtype
/
regression_ddc_588_test.dart
blob: edf3c61018e3f4ea3920119ddd528fa98a95fc06 [
file
] [
log
] [
blame
]
import
"package:expect/expect.dart"
;
// regression test for ddc #588
typedef
int
Int2Int
(
int
x
);
void
foo
(
List
<
Int2Int
>
list
)
{
list
.
forEach
((
f
)
=>
print
(
f
(
42
)));
}
void
main
()
{
dynamic
l
=
<
Function
>[];
Expect
.
throwsTypeError
(()
=>
foo
(
l
));
}