Swift Compiler Bug?
Swift Compiler Bug?
- Subject: Swift Compiler Bug?
- From: Charles Jenkins <email@hidden>
- Date: Sun, 14 Sep 2014 22:47:09 -0400
Now on to the next thing that doesn’t seem to work according to the documentation…
These are the first few lines of my function which will save my document data:
override func fileWrapperOfType(
typeName: String!,
error outError: NSErrorPointer
) -> NSFileWrapper!
{
if self.theFileWrapper == nil {
let noWrappers: [AnyObject] = []
self.theFileWrapper = NSFileWrapper( directoryWithFileWrappers: noWrappers )
}
When I start typing “directoryWithFileWrappers,” Xcode displays its suggestion list showing the prototype:
NSFileWrapper( directoryWithFileWrappers: [NSObject : AnyObject] )
I think I could send nil instead of bothering to create an empty array, but whatever.
Anyway, Xcode gives me the prototype which agrees with Apple’s documentation, and I code according to it. Then Xcode marks the line as an error: “Missing argument for parameter ‘options’ in call,” and my project won’t build.
Is there an error in my code, or is this a problem I should report to Apple? And in the latter case, what’s the best way?
—
Charles Jenkins
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden