It looks like it’s quite often crashing when you’re still editing code that isn’t syntactically correct - e.g. your snippet is from a version of the file where I was still editing it and the { was after the // instead of before.
Looking at some of the other txt files that show stack traces along with the current code it’s parsing show similar things.
But TBH while annoying (and obviously something you’d want to fix), that’s not the main issue as I don’t typically edit code in Fire (I use Xcode). It’s failures to compile syntactically correct code that compiles fine in Xcode and in Fire 9.3.103.2211 that are the main concern.
Fire is definitely telling me I have the latest version (10.0.0.2305), but
a) new solution command doesn’t work
b) still get all the above compile errors with: Archive.zip (3.5 KB)
In Fire 9.3 the same code compiles with the expected error “unknown type” for the line “extension FooBar”
(also, 9.3 is telling me an update is available, but I can’t see how to download it - only v10)
Ok finally was able to download and install.
All the same errors occur (including New Solution doing nothing) except that [weak] inside an #if iOS block is now shown as just a warning in the IDE (even though it’s an error in the build log).
I guess our operator rules are just too strict, we’ll fix.
Not entirely are about this one though, that seems as designed?
let array = [Dictionary<String, AnyObject>]()
let bar = array.flatMap({ $0["foo"] as? String }) // E575 Cannot assign wrapped nullable to not nullable type (String)
your dictionary is defined as non-nullable String. yet you pass a “wrapped” potentially-null string, so the error is correct, no?
Thats not the problem. the problem, as I understand it, is that as? String will produce a nullable string (ie String?, but the call expects a non-nullable (String)…
What call expects a non-nullable string? flatMap should be able to work with a closure that returns anything. But like I said, this code compiles and works fine with Xcode and with Fire 9.
the array.flatMap issue we still need to look into; I’ll check with Carlo because TBH I don’t quite understand whats happening there and what the error refers to. The rest should be fixed for 2325, iirc, yes.