Skip to content

Instantly share code, notes, and snippets.

@angerman
Last active October 8, 2015 10:13
Show Gist options
  • Save angerman/94d393d3c010c11a1ecb to your computer and use it in GitHub Desktop.
Save angerman/94d393d3c010c11a1ecb to your computer and use it in GitHub Desktop.
value of type '_ -> _' has no member 'init'
class X : NSCoding {
@objc func encodeWithCoder(aCoder: NSCoder) {fatalError()}
@objc required init?(coder aDecoder: NSCoder) {fatalError()}
}
class B {}
class A<T>:X {}
class C:A<B> {
init(x:Int) {super.init()}
}
//
// If there is a class adopting NSCoding somewhere in the superclass chain, we get:
//
// 8:24: error: value of type '_ -> _' has no member 'init'
// init(x:Int) {super.init()}
// ~~~~~~^~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment