mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-18 10:53:45 +01:00
Remove return type pack annotation from allowed type pack default values,type annotation syntax doesn't allow that to be stand-alone
This commit is contained in:
parent
f481a91af6
commit
db89abbeac
1 changed files with 3 additions and 4 deletions
|
@ -48,10 +48,9 @@ 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 B<T, U... = (number, number)> -- ok, type pack with two elements
|
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