Skip to content
Snippets Groups Projects
Commit adbce7bb authored by Natalie Weizenbaum's avatar Natalie Weizenbaum Committed by GitHub
Browse files

Make expectAsync work with optional arguments. (#512)

This worked with the old expectAsync(), but was broken when the new
functions were introduced. It was causing an analysis error in the
tests.
parent 210624ae
No related branches found
No related tags found
Loading
......@@ -3,6 +3,9 @@
* Add the `spawnHybridUri()` and `spawnHybridCode()` functions, which allow
browser tests to run code on the VM.
* Fix the new `expectAsync` functions so that they don't produce analysis errors
when passed callbacks with optional arguments.
## 0.12.17+3
* Internal changes only.
......
......@@ -12,12 +12,12 @@ const _PLACEHOLDER = const Object();
// Functions used to check how many arguments a callback takes.
typedef T Func0<T>();
typedef T Func1<T, A>(A a);
typedef T Func2<T, A, B>(A a, B b);
typedef T Func3<T, A, B, C>(A a, B b, C c);
typedef T Func4<T, A, B, C, D>(A a, B b, C c, D d);
typedef T Func5<T, A, B, C, D, E>(A a, B b, C c, D d, E e);
typedef T Func6<T, A, B, C, D, E, F>(A a, B b, C c, D d, E e, F f);
typedef T Func1<T, A>([A a]);
typedef T Func2<T, A, B>([A a, B b]);
typedef T Func3<T, A, B, C>([A a, B b, C c]);
typedef T Func4<T, A, B, C, D>([A a, B b, C c, D d]);
typedef T Func5<T, A, B, C, D, E>([A a, B b, C c, D d, E e]);
typedef T Func6<T, A, B, C, D, E, F>([A a, B b, C c, D d, E e, F f]);
typedef bool _IsDoneCallback();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment