You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 isFunc1) ...
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 isFunc1) ...
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).
The text was updated successfully, but these errors were encountered:
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.
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.
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 anis
check: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:Note that this is only mostly equivalent, in that it changed what
f
gets promoted to. Iff
is called in the scope of the promotion toFunc1
, this call must be made explicitly dynamic to recover the previous semantics:(f as dynamic)(args)
.The text was updated successfully, but these errors were encountered: