[swift-evolution] Proposal: Do not allow redundant unwrapping.

Amir Michail a.michail at me.com
Wed Dec 9 08:31:23 CST 2015

The following should result in a compile error:

var x:Int? = 5
var y:Int?

y = x! // compiler error, unwrapping is redundant

The unnecessary unwrapping gives the wrong impression about the type of y — namely that it is Int.

More information about the swift-evolution mailing list