Mac OSX El Capitan 10.11.3
Xcode 7.2.1 (7C1002)
MacBook Pro 13" mid 2009
--> No errors or warnings. Prints "I'm young". Although Alt-Click shows that myAge is an Int, Xcode doesn't insist on handling the possible negative cases.
--> No errors or warnings. Prints "?". Like in the first example, Xcode should complain and ask for a default case, but it doesn't.
--> No errors. Prints "?". Warning in the line with case 0...17: "Will never be executed". Deleting that line pushes the warning to the next line, and so on, until only the negative case is left.
--> As soon as I delete the negative case, the expected error appears: "Switch must be exhaustive, consider adding a default clause". (Note that I left out the positive cases 61...Int.max.)
--> No errors. Warning in the line with case -3: "Will never be executed". Prints "I'm young".
--> Warning in the line with case -3: "Will never be executed". Compiles, but crashes on runtime: "fatal error: Range end index has no valid successor" marking the line with "case 61...Int.max" with: "Thread 1: EXC_BAD_INSTRUCTION (code=I386_INVOP, subcode=0x0)"
It seems that negative Ints in a switch are not handled correctly. It could be a swift problem or just Xcode not warning and showing errors correctly. Xcode shouldn't allow for a switch to not handle all possible cases.