[swift-users] comparison Non-Optional and Optional without unwrap

Седых Александр se-a at mail.ru
Tue Oct 18 03:58:42 CDT 2016


This code work: 

let one:  Int ? =  5
let two =  5
let result =  one ==  two
 
print ( result )

//print true
Why we can access to Optional value without unwrap within comparison operations?

-- 
Седых Александр
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20161018/1dd2e3aa/attachment.html>


More information about the swift-users mailing list