Skip to content

Conversation

vedantk
Copy link
Contributor

@vedantk vedantk commented Jan 13, 2018

Switch cases without a trailing curly brace have ambiguous cleanup
locations. Here's what the current stepping behavior looks like:

switch x {
case ...:
if true { foo() } // Step
else { bar() } // Step
}

The second step can be misleading, because users might think that the
else branch is taken.

rdar://35628620
(cherry picked from commit b27ed06)

@vedantk
Copy link
Contributor Author

vedantk commented Jan 13, 2018

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - c2a8ef26f17557a1efff2db89fe5550ef1fdcb0e

Switch cases without a trailing curly brace have ambiguous cleanup
locations. Here's what the current stepping behavior looks like:

  switch x {
    case ...:
      if true { foo() } // Step
      else    { bar() } // Step
  }

The second step can be misleading, because users might think that the
else branch is taken.

rdar://35628620
(cherry picked from commit b27ed06)
@vedantk
Copy link
Contributor Author

vedantk commented Jan 13, 2018

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - c2a8ef26f17557a1efff2db89fe5550ef1fdcb0e

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - c2a8ef26f17557a1efff2db89fe5550ef1fdcb0e

@vedantk vedantk merged commit dd739ec into swiftlang:swift-4.1-branch Jan 13, 2018
@vedantk vedantk deleted the swift-4.1-branch branch January 31, 2018 00:25
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.

2 participants