This is a useless error message that appears only in Swift version 3.0 to 3.0.2. The problem is that Swift does not mean deploying optional, as it thinks you are trying to perform additional validation.
So the solution, as @vacawama says , is to simply explicitly expand the optional parameter:
if sheduleRide!.isRideForNow! {
}
(, , , sheduleRide, isRideForNow nil)
, Swift IUO , , IUO, SE- 0054 - , IUO , , .
, . , :
if sheduleRide!.isRideForNow {
}
Swift 3.1.
, @vadian , , isRideForNow IUO. , ( lazy).
, :
struct Ride {
var isRideForNow: Bool
}
var sheduleRide = Ride(isRideForNow: false)