Skip to content

Commit e147e2b

Browse files
authored
Replace implicit dynamic with Null in arity checks (#675)
Fixes #674 dynamic is treated as the bottom type for function arguments, but this will soon change. Null will continue to be the bottom type. The question we are asking is "Is this a function that takes one argument", when dynamic is no longer the bottom type the question will become "Is this a function that takes one dynamic argument", and a function which take one argument of a specific type does *not* take a dynamic argument.
1 parent d618fa1 commit e147e2b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/src/frontend/expect_async.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ typedef T Func6<T, A, B, C, D, E, F>([A a, B b, C c, D d, E e, F f]);
2525
// ([dynamic]) -> dynamic.
2626

2727
typedef _Func0();
28-
typedef _Func1(a);
29-
typedef _Func2(a, b);
30-
typedef _Func3(a, b, c);
31-
typedef _Func4(a, b, c, d);
32-
typedef _Func5(a, b, c, d, e);
33-
typedef _Func6(a, b, c, d, e, f);
28+
typedef _Func1(Null a);
29+
typedef _Func2(Null a, Null b);
30+
typedef _Func3(Null a, Null b, Null c);
31+
typedef _Func4(Null a, Null b, Null c, Null d);
32+
typedef _Func5(Null a, Null b, Null c, Null d, Null e);
33+
typedef _Func6(Null a, Null b, Null c, Null d, Null e, Null f);
3434

3535
typedef bool _IsDoneCallback();
3636

0 commit comments

Comments
 (0)