Do not allow regular type assignment to a type pack as a default parameter

This commit is contained in:
Vyacheslav Egorov 2021-11-24 14:05:35 +02:00
parent dd02420f70
commit 74b889584a

View file

@ -49,7 +49,7 @@ type A<T, U = V, V = T> = ... -- not allowed
Default type parameter values are also allowed for type packs: Default type parameter values are also allowed for type packs:
```lua ```lua
type A<T, U... = ...string> -- ok, variadic type pack type A<T, U... = ...string> -- ok, variadic type pack
type C<T, U... = string> -- ok, type pack with one element type C<T, U... = (string)> -- ok, type pack with one element
type D<T..., U... = T...> -- ok type D<T..., U... = T...> -- ok
``` ```