We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, when I format this block of code in Xcode 8.3 and Swimat 1.3.3 extension:
nombre = valores["nombre"] as? String descripcion = valores["descripcion"] as? String fecha_entrada = firebase ? Date(timeIntervalSince1970: valores["fecha_entrada"] as? Double ?? 0) : valores["fecha_entrada"] as? Date fecha_salida = firebase ? Date(timeIntervalSince1970: valores["fecha_salida"] as? Double ?? 0) : valores["fecha_salida"] as? Date noches = firebase ? valores["noches"] as? Int : Int((valores["noches"] as? Double) ?? 0) coste = firebase ? Coste(firebase: valores["coste"] as! [String: Any?]) : valores["coste"] as? Coste
I get this output and the compilation breaks:
nombre = valores["nombre"] as? String descripcion = valores["descripcion"] as? String fecha_entrada = firebase ? Date(timeIntervalSince1970: valores["fecha_entrada"] as? Double ?? 0) : valores["fecha_entrada"] as? Date fecha_salida = firebase ? Date(timeIntervalSince1970: valores["fecha_salida"] as? Double ?? 0) : valores["fecha_salida"] as? Date noches = firebase ? valores["noches"] as ? Int : Int((valores["noches"] as? Double) ?? 0) ^--- extra space, it shouldn't be there coste = firebase ? Coste(firebase: valores["coste"] as! [String: Any?]) : valores["coste"] as? Coste
Otherwise, thank you for this awesome tool.
The text was updated successfully, but these errors were encountered:
The parser is mismatch as ? Int : Int as a ternary. You may add a parentheses to distinct the code first.
as ? Int : Int
noches = firebase ? (valores["noches"] as? Int) : Int((valores["noches"] as? Double) ?? 0)
We'll update status after we fix the bug. Thank you for your report, really help!!!
Sorry, something went wrong.
Parentheses did the trick. Thanks for the tip.
Any updates here?
Just tested with latest Swimat 1.6.2 in Xcode 10.2.1 and the bug is still present.
No branches or pull requests
Hello, when I format this block of code in Xcode 8.3 and Swimat 1.3.3 extension:
I get this output and the compilation breaks:
Otherwise, thank you for this awesome tool.
The text was updated successfully, but these errors were encountered: