You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is intended behavior. break and continue don't normally consider do, but if you explicitly label it, it's obvious enough what you're trying to do, and there's no real reason to restrict it.
It's unclear what the meaning of `continue` would be for `if` and `switch`, since those are multi-clause statements with one or more controlling expressions, whereas there's really no ambiguity about what continuing a `do` should mean. Also, being able to explicitly repeat a block of code that doesn't normally repeat can be quite useful, and you can't express that with normal loops without creating an artificial variable `while`-loop on.
Environment
Xcode 9.3.1
Additional Detail from JIRA
md5: 5a08a836c5a5ffc957c552bd92031f8f
is duplicated by:
continue
which lead to loopIssue Description:
The following program:
compiles and outputs:
I guess continue is not meant to work with do statements.
Related forum posts:
https://forums.swift.org/t/a-few-questions-about-defer-s-behavior/12266/32
https://forums.swift.org/t/intended-behavior-of-continue-in-repeat-while/12354/6
The text was updated successfully, but these errors were encountered: