I can confirm this code works without error using Xcode 7.3.1 (7D1014), sam as yours, but under OS X 10.11.5. I'm not using the beta, so it seems they maybe did change something there. I assume you have tried the usual stuff since upgrading -- delete Derived Data folder, run the Option-Product>Clean Build Folder command, reboot? Or, it may be a phantom error caused in some surrounding code. I sometimes get these especially if I have mismatched braces or parentheses somewhere.
Topic:
Programming Languages
SubTopic:
Swift
Tags: