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

Single fallthrough not allowed #859

Closed
XmiliaH opened this issue May 9, 2024 · 2 comments · Fixed by #866
Closed

Single fallthrough not allowed #859

XmiliaH opened this issue May 9, 2024 · 2 comments · Fixed by #866
Labels
bug Something isn't working

Comments

@XmiliaH
Copy link
Contributor

XmiliaH commented May 9, 2024

Currently cases with just a fallthrough statement are not allowed which seems strage to me.

switch 1 do
    case 1:
        --[[@fallthrough]]
    case 2:
end
@Sainan Sainan added the question Further information is requested label May 9, 2024
@Sainan
Copy link
Collaborator

Sainan commented May 9, 2024

I can't say if this was intended, but I'm also not sure of the merit of allowing the developer to write nonsensical annotations like this.

@XmiliaH
Copy link
Contributor Author

XmiliaH commented May 9, 2024

I do not really care if it is or is not allowed, but I would not say that this is always a nonsensical annotations. Maybe there is a developer out there who has a special case in the switch statment that is empty and should fall trhough and mark this case as such to make it distinct, yet obvious.

@Sainan Sainan added bug Something isn't working and removed question Further information is requested labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants