Binary operator '!=' can be applied to operands of type 'Int' and 'NilLiteralConvertible' in map

Number:rdar://0 Date Originated:
Status: Resolved:
Product: Product Version:
Classification: Reproducible:
let a = [3]
let b = { $0 != nil } // compiles, but should not
let c = 3
let d = (c != nil) // does not compile (Binary operator '!=' cannot be applied to operands of type 'Int' and 'NilLiteralConvertible')

Xcode Version 7.0.1 (7A1001) and Version 7.1 (7B91b)
Mac OS X Yosemite 10.10.5 (14F1021)


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!