SR-103 Protocol Extension: function's implementation cannot be overridden by a subclass
Issue Description:
Compiler reports this error for `Bar.f` overriding `Foo.f`(offered by default implementation in `P` extension):
error: method does not override any method from its superclass
protocolP {
funcf()
}
extensionP {
funcf() {}
}
classFoo: P {
// func f() {}
}
classBar: Foo {
// Why no `override`? From what `Bar` sees its superclass `Foo` implements `P`'s interface, whether with explicit implementation of `f` in itself or borrowed implementation of `f` from `P`'s extension. Uncomment Foo.f() to see the contradictory behavior.overridefuncf() {}
}
The text was updated successfully, but these errors were encountered:
Environment
Swift 3 in Xcode 8.0 beta 3
Additional Detail from JIRA
md5: 6ccb97ed31171e7abf704a2cb03475e4
duplicates:
Issue Description:
Compiler reports this error for `Bar.f` overriding `Foo.f`(offered by default implementation in `P` extension):
The text was updated successfully, but these errors were encountered: