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

Fully support switch expressions #4977

Closed
4 tasks done
smillst opened this issue Dec 3, 2021 · 4 comments
Closed
4 tasks done

Fully support switch expressions #4977

smillst opened this issue Dec 3, 2021 · 4 comments
Assignees

Comments

@smillst
Copy link
Member

smillst commented Dec 3, 2021

#4976 makes it so that the Checker Framework doesn't not crash on switch expressions, but it does not handle them as precisely as possible. Here's a list of TODOs to finish supporting switch expressions:

@msridhar
Copy link
Contributor

msridhar commented Dec 4, 2021

@Gellert5225 has started looking into handling arrow case labels in switch statements, but he is not looking at switch expressions. When I spoke to @mernst we decided the work for statements and expressions could be done somewhat in parallel, but if you think closer coordination is warranted, let us know and we can discuss further.

@smillst
Copy link
Member Author

smillst commented Dec 6, 2021

CFGTranslationPhaseOne.SwitchBuilder needs to be update to handle the arrow case labels. I think support for switch expressions will use the updated switch builder. (I say "think", because Mike and I haven't settled on an implementation strategy yet.). However, we can probably work on support for switch expressions before SwitchBuilder is updated by just using test cases that use case L : <block> or case : -> <expression> varieties.

@msridhar
Copy link
Contributor

msridhar commented Dec 6, 2021

Ok, sounds good, @Gellert5225 and I will communicate / open PRs as we make progress.

@smillst
Copy link
Member Author

smillst commented Dec 17, 2021

All the tasks have been fixed, so I'm closing this issue.

@smillst smillst closed this as completed Dec 17, 2021
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

No branches or pull requests

2 participants