[swift-evolution] Better Self support with class funcs
Andrew Brown
a.br at me.com
Tue Dec 15 09:30:45 CST 2015
Seems to be ok in a playground - just needs a required initialiser.
class Base {
class func create() -> Self {
return self.init()
}
required init() {
}
}
class Derived : Base {
}
let a = Base.create()
let b = Derived.create()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151215/acb9fa81/attachment.html>
More information about the swift-evolution
mailing list