Am 18.04.2016 um 11:51 schrieb tuuranton--- via swift-users:
Why does this compile? let t1: Int? = 2print(t1 ?? "asdf")
Well, I guess you try to re-typedef (??) a language construct. According to NSHipster ?? is the languages |nil| coalescing operator.
So it simply compiles because t1 isn't nil. Further reference: https://en.wikipedia.org/wiki/Null_coalescing_operator#Swift
_______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users