Hello,
I'm subclassing NSMutableURLRequest to patch lack of httpBody property. My
subclass doesn't implement any initialisers so it inherits all the designated
initialisers. From what I understand, since all designated initialisers are
implemented(inherited) then I should also inherit convenience initialisers.
My code:
class safe_NSMutableURLRequest: NSMutableURLRequest {
#if os(Linux)
var httpBody: NSData?
#endif
}
let someURL = NSURL(string: "https://google.com")!
let request = safe_NSMutableURLRequest(url: someURL)
the last line produces an error:
error: incorrect argument label in call (have 'url:', expected 'coder:')
Could you please explain me why I'm not inheriting convenience initialiser?
Regards,
Michal Kalinowski
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users