I've recently updated my Xcode and now receive the following error. The trouble is the code is imported from someone else and I don't fully understand it or understand how to break it up onto multiple lines for easier computing:
public protocol Expressible {
var expression: Expression<Void> { get }
}
extension Expressible {
// naïve compiler for statements that can’t be bound, e.g., CREATE TABLE
// FIXME: use @testable and make internal
public func asSQL() -> String {
let expressed = expression
var idx = 0
return expressed.template.characters.reduce("") {
template, character in
return template + (character == "?" ? transcode(expressed.bindings[idx+=1]) : String(character))
}
}
}
Error is at the following line:
return expressed.template.characters.reduce("") {
Actual Error message is:
Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions
Thank you.