You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct Foo {
let d: Double?
}
…where(\Foo.d < 5.0)…
The above gives a compilation error.
Work around is:
…where(\Foo.d! < 5.0)…
While Swift won't technically let you do a comparison with an unwrapped optional:
var d: Double? = 4.0
d < 5.0
error: repl.swift:5:3: error: binary operator '<' cannot be applied to operands of type 'Double?' and 'Double'
d < 5.0
~ ^ ~~~
it's ok in SQL.
Look into making this work without the "force unwrap" of the property. (It's not actually force unwrapping.)
The text was updated successfully, but these errors were encountered:
The above gives a compilation error.
Work around is:
While Swift won't technically let you do a comparison with an unwrapped optional:
it's ok in SQL.
Look into making this work without the "force unwrap" of the property. (It's not actually force unwrapping.)
The text was updated successfully, but these errors were encountered: