You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compile Swift Module 'KeyedUnarchiverSubclassing' (1 sources)
/Users/gmilos/Repos/KeyedUnarchiverSubclassing/Sources/KeyedUnarchiverSubclassing/main.swift:4:14: error: initializer does not override a designated initializer from its superclass
override init(forReadingWith data: Data) {
~~~~~~~~ ^
Foundation.NSKeyedUnarchiver:6:24: note: attempt to override convenience initializer here
public convenience init(forReadingWith data: Foundation.Data)
^
/Users/gmilos/Repos/KeyedUnarchiverSubclassing/Sources/KeyedUnarchiverSubclassing/main.swift:5:9: error: must call a designated initializer of the superclass 'NSKeyedUnarchiver'
super.init(forReadingWith: data)
^
Foundation.NSKeyedUnarchiver:6:24: note: convenience initializer is declared here
public convenience init(forReadingWith data: Foundation.Data)
The text was updated successfully, but these errors were encountered:
I wasn't around when s-cl-f was being initially written, so I'm not sure why this was written this way — @phausler, @parkera, any background on why this is a convenience initializer? The real initializer is private, meaning that this class is un-subclassable unless you inherit all initializers.
I think NSKeyedArchiver is missing the NS_DESIGNATED_INITIALIZER decoration completely on Darwin, so perhaps there was not a right answer here in the first place.
Additional Detail from JIRA
md5: 853ed74247553bca5a25200d1c4cabd6
Issue Description:
The following piece of code compiles just fine on Darwin:
But fails on Linux (4.1, ubuntu 14.04) with:
The text was updated successfully, but these errors were encountered: