Empty tuple gives a syntax error


(Marko Havu) #1

Silver gives a syntax error for an empty switch case with (). Granted, using break is probably a more elegant solution, but () is still valid Swift.

(Carlo Kok) #2

Can you show what you mean exactly?

(Marko Havu) #3
switch compiler {
   case "Silver":
     print("syntax error")
   case "Xcode":
     print("compiles happily")

(Carlo Kok) #4

Ah. I had never seen that. I’ll look into it.

(RemObjects) #5

Thanks, logged as bugs://80563

(RemObjects) #6

bugs://80563 got closed with status fixed.