Skip to content

Conversation

@edemaine
Copy link
Contributor

  • Fix switch generates unneeded breaks #5344: no longer generate break when the case body exits on its own, typically by a forced return being pushed within if blocks.
  • Add new alwaysJumps node method to detect when a switch case can
    safely drop its break. Similar to jumps but ANDing instead of OR.
  • Fix some documentation describing jumps, which ignores throw; it turns out x = (throw 1) is valid CoffeeScript.

Add new `alwaysJumps` node method to detect when a switch case can
safely drop its `break`.  Similar to `jumps` but ANDing instead of OR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

switch generates unneeded breaks

2 participants