Swift will be the new programming language for iOS. Unfortenately there are little but annoying bugs in Xcode while using Swift. In this article I will give some code samples for such a problem using OS X Yosemite 10.10.1 and Xcode 6.1
A remarkable fact is that little information can be found on the web while searching for solutions. Is Swift then not fully accepted by App developers?
The next error message will be shown with a few simple lines of code, sample 1.
Inserting an empty line after the else clause, see code sample 2, will solve the problem. In the last sample changed the order of the uppercaseString and again the error message will not be shown.
Hopefully the next updates for Xcode will solve this problems.