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
Niki4tap
changed the title
Generic type functions do not receive the type arguments
Variadic type functions do not receive the type arguments
Jan 5, 2025
In this case, being underspecified means that it is not supported and the required design is missing on how variadic arguments and types/packs interact and are handled by type functions.
Specifying the behavior is likely to require an RFC.
Type function signatures are unrestricted because type functions can call each other just fine.
I tried this code:
...
in type function code appears to always expand to nothing, no matter what arguments are provided.Output from
luau-analyze
:With
--!strict
, this also prints:TypeError: Generic type 'variadic_type_fn' expects 0 type arguments, but 1 is specified
I looked at the RFC, and I don't think it mentions anything about variadics, or restricting type function signatures, so I assume this should work.
The text was updated successfully, but these errors were encountered: