Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disallow variadic type packs in parenthesized types when in return position #1322

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jackdotink
Copy link
Contributor

@jackdotink jackdotink commented Jul 11, 2024

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.

@Dekkonot
Copy link
Contributor

Rename the PR to indicate what it's about please.

@jackdotink
Copy link
Contributor Author

you're no fun :c

@jackdotink jackdotink changed the title small fix disallow variadic type packs in parenthesized types when in return position Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants