[swift-users] Amusing function return warning in swift 3
Nathan de Vries
ndevries at apple.com
Sun Jun 12 18:06:48 CDT 2016
I had similar issues with UIApplicationMain when I moved to Swift 3:
<rdar://problem/25693546> UIApplicationMain's argv parameter should be declared nullable
Presumably NSApplicationMain's argv parameter needs the same nullable annotation.
> On Jun 12, 2016, at 3:56 PM, Marco S Hyman via swift-users <swift-users at swift.org> wrote:
> My first try with 5/31 swift 3 snapshot gave me a warning regarding an unused return value -- in main.swift. Wouldn’t you know, NS ApplicationMain is declared as
> func NSApplicationMain(_ argc: Int32,
> _ argv: UnsafeMutablePointer<UnsafeMutablePointer<CChar>?>) -> Int32
> And what does the second line of function help say?
> "This method never returns a result code."
> OK ;)
> swift-users mailing list
> swift-users at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users