vinivendra / Gryphon

The Swift to Kotlin translator.
https://vinivendra.github.io/Gryphon/
Other
609 stars 46 forks source link

Remove break statements in switches #37

Closed pt2121 closed 4 years ago

pt2121 commented 4 years ago

Fixes #17

I basically removed statements after break - I believe they are technically dead code. Is that what you expected?

vinivendra commented 4 years ago

This isn't what I had in mind, but I like your way better. My idea was to remove only the breaks and raise a warning for the other statements, but your idea of removing everything makes the translations more consistently correct. Also, Swift already raises a warning for statements after breaks, so we're covered there.

vinivendra commented 4 years ago

Thank you so much! This looks great. Just one more thing: could you change this pull request to target the development branch instead of master? I think it might be better to have day-to-day development on the development branch going forward, but I haven't yet had time to update this in the documentation (sorry about that). There's a GitHub blog post that shows how to do that here, in case you're wondering.

vinivendra commented 4 years ago

It's done! Good work, and thanks.

pt2121 commented 4 years ago

Awesome, thanks!