I am quite new to swift and got a pretty weird compiler error:
Command /Applications/Xcode6-Beta5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 254
The Error occours when I ad the following lines to my code:
var response = HoopsClient.instance().collections["posts"]
response = response["_id"]
when I remove the second line everything compiles fine. I don't get it ^^
edit: The reason is probably that "response" is of type "AnyObject" according to the compiler... but shouldn't that be detected by xcode or give me a runtime error instead of this compiler error?
AnyObjectdoes not have a subscript defined, so that explains why you are getting the compiler error. This is the correct behavior; you don't want it waiting until runtime when it can tell you about the error at compile time. - jacobhyphenated