mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Do not allow regular type assignment to a type pack as a default parameter
This commit is contained in:
parent
dd02420f70
commit
74b889584a
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue