importFoundationfuncf(_n: NSNumber) {}
let int: Int=0f(int)
/*⛔️ error: cannot convert value of type 'Int' to expected argument type 'NSNumber'f(int) ^ NSNumber( )*/// Fix it as advised...f(NSNumber(int))
/*⛔️ error: no exact matches in call to initializerf(NSNumber(int)) ^Foundation.NSNumber:41:12: note: incorrect labels for candidate (have: '(_:)', expected: '(value:)') public init(value: Int) ^Foundation.NSNumber:2:42: note: incorrect labels for candidate (have: '(_:)', expected: '(integerLiteral:)') @nonobjc required public convenience init(integerLiteral value: Int) ^*/f(NSNumber(value: int)) // ✅ OK
I believe NSNumber(value: ) should be suggested first.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: ee5ef301fae73e1dec12f385ba78f3ac
Issue Description:
Given the following code:
I believe
NSNumber(value: )
should be suggested first.The text was updated successfully, but these errors were encountered: