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

Allow fallthrough on empty cases #866

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

Sainan
Copy link
Collaborator

@Sainan Sainan commented May 13, 2024

It's a bit strange, but there's no logical reason for why it should be a parse error. Fixes #859.

@XmiliaH
Copy link
Contributor

XmiliaH commented May 13, 2024

How about:

switch 1 do
    case 1:
        --[[@fallthrough]]
    default:
end

and I think this allows

switch 1 do
        --[[@fallthrough]]
    case 1:
end

@well-in-that-case well-in-that-case merged commit 60e6a39 into main May 14, 2024
8 checks passed
@well-in-that-case well-in-that-case deleted the single-fallthrough branch May 14, 2024 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single fallthrough not allowed
3 participants