Behaves as intended, albeit counterintuitively.

[~ indicates appropriate coercion]

1) (nil : Optional<T ~ Int>) == (0 : Int ~ Optional<Int>) false because nil is 
the lower bound of all possible integers.
2) (nil : Optional<T ~ Int>) < (0 : Int ~ Optional<Int>) true for reasons above
3) (nil : Optional<T ~ Int>) > (0 : Int ~ Optional<Int>) false for reason above.

~Robert Widmann

2016/05/24 2:27、Yaman JAIOUCH via swift-dev <[email protected]> のメッセージ:

> nil == 0 // false
> nil < 0 // true
> nil > 0 // false
> 
> Is this a potential bug or an intended behavior ?
> _______________________________________________
> swift-dev mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-dev
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to