Closed
Description
This package (including at least code in expect_async) uses the pattern of defining a function type taking dynamic
arguments and using this to test arity via an is
check:
typedef _Func1(a);
...
if (f is Func1) ...
This currently works in DDC because of the special treatment of function types with dynamic arguments, but this treatment is going away now that we have moved Null
to the bottom of the hierarchy and can use that. This code needs to be updated to use the following essentially almost equivalent pattern instead:
typedef _Func1(Null a);
...
if (f is Func1) ...
Note that this is only mostly equivalent, in that it changed what f
gets promoted to. If f
is called in the scope of the promotion to Func1
, this call must be made explicitly dynamic to recover the previous semantics: (f as dynamic)(args)
.
Activity
Replace implicit dynamic with Null in arity checks
Replace implicit dynamic with Null in arity checks (#675)