luau icon indicating copy to clipboard operation
luau copied to clipboard

disallow variadic type packs in parenthesized types when in return position

Open jackdotink opened this issue 7 months ago • 2 comments

This PR is a breaking change, but I doubt anyone uses the syntax.

local function a(): (string, ...number) | boolean -- valid syntax, but weird type
local function a(): (string, buffer, ...number) | boolean -- syntax error
local function a(): (...number) | boolean -- syntax error

This PR makes the first example a syntax error, which it should be.

jackdotink avatar Jul 11 '24 00:07 jackdotink