swift icon indicating copy to clipboard operation
swift copied to clipboard

[SR-2379] `Data` does not participate in implicit `Optional` promotion`

Open jadengeller opened this issue 10 years ago • 1 comments

Previous ID SR-2379
Radar rdar://problem/27899358
Original Reporter @jadengeller
Type Bug
Status Closed
Resolution Cannot Reproduce

Environment

Xcode 8 Beta 6, Swift 3

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, TypeChecker
Assignee @rudkx
Priority Medium

md5: bf4a38576e48109f71a8c0b722ce0da0

Issue Description:

let a: Data? = "umm".data(using: String.Encoding.utf8)!
let b: Any?  = "umm".data(using: String.Encoding.utf8)!

Both of these fail to compile.

jadengeller avatar Aug 17 '16 21:08 jadengeller

Those examples both compile in Swift 4.2.

mdiep avatar Jun 16 '18 16:06 mdiep