Just tried Fire 10, and almost none of our code that was working fine with Fire 9.3.103.2211 compiles.
Just some of the errors:
Attributes not allowed here:
#if !ANDROID
@testable import <PACKAGE>
#endif
Seems Fire 10 is ignoring the #if - have tried various directives with no luck. We have similar errors such as “Syntax error” trying to compile:
#if IOS
infix operator =>: Subscribe
#endif
Obviously it would be nice if Fire supported this syntax, but it’s critical it will allow us to compile code that uses inside an #if that shouldn’t apply to Fire compilation.
Variable is read-only
class Bar {
public func foo() {
let callback = {
(param: String?) -> () in
guard let _ = param else { return }
}
}
}
For “guard” line. Doesn’t happen if foo() is free-standing global function. We have variants of this pattern heavily throughout our code.
T has no default property
In package “A”:
extension Array {
public func flatMap<ElementOfResult>(_ transform: (T) -> ElementOfResult) -> [ElementOfResult] {
return [ElementOfResult]()
}
}
In package “B”:
let array = [Dictionary<String, AnyObject>]()
let bar = array.flatMap({ $0["foo"] as? String })
Doesn’t happen if “flatMap” is defined in package B.
Will continue investigating.
Also Fire was using 150% of my CPU and weird spurious inline warnings/errors started appearing in the IDE code view (including “internal error - NullPointerException” or something similar)