mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:29:48 +00:00
b955271e51
Change-Id: I8d41ad649c83cd97253006693a0cf3676de418e9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145542 Commit-Queue: Bob Nystrom <rnystrom@google.com> Reviewed-by: Erik Ernst <eernst@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com>
15 lines
255 B
Dart
15 lines
255 B
Dart
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));
|
|
}
|