The following generates an error:
protocol Foo {
func foo() -> Self
}
protocol Bar: Foo {
}
final class Baz: Bar {
func foo() -> Baz { return self} // Error: Method "foo() -> Self" not implemented as required for interface "Bar"
}
The following generates an error:
protocol Foo {
func foo() -> Self
}
protocol Bar: Foo {
}
final class Baz: Bar {
func foo() -> Baz { return self} // Error: Method "foo() -> Self" not implemented as required for interface "Bar"
}
Self in protocols is currently not supported known issue. Sorry.