The following Swift file
switch readLine() {
case "1": print("1")
case "2":
print("2")
case "a":
switch readLine() {
case "1": print("1")
default: print("Other")
}
default: print("Other")
}
(there is whitespace in "a": ) is indented like so
switch readLine() {
case "1": print("1")
case "2":
print("2")
case "a":
switch readLine() {
case "1": print("1")
default: print("Other")
}
default: print("Other")
}
The expected behavior is for it to be indented as so:
switch readLine() {
case "1": print("1")
case "2":
print("2")
case "a":
switch readLine() {
case "1": print("1")
default: print("Other")
}
default: print("Other")
}
The detection for cases appears to expect the : to end the line, which is not required by Swift, and it appears to align a case with the previous use of switch instead of the switch it is actually part of. The syntax highlighting still appears correct.
The following Swift file
(there is whitespace in
"a":) is indented like soThe expected behavior is for it to be indented as so:
The detection for
cases appears to expect the:to end the line, which is not required by Swift, and it appears to align acasewith the previous use ofswitchinstead of theswitchit is actually part of. The syntax highlighting still appears correct.