It’s not a bug. It is, alas, intentional. Implicit unwrapping of optionals in comparisons (>
) has been removed from the language.
So, the problem now is that what’s on the left side of the >
is an Optional, and you can no longer compare that directly to 4
. You have to unwrap it and get an Int, one way or another.