Hi swift-users,
Is there anything like the `override` keyword for making sure that default
implementations in protocols are not adding a new function?
An example would be the following:
protocol FooProto {
func foo()
}
extension FooProto {
func foo() { /* <-- can I mark this as being a default implementation */
print("foo default")
}
}
Right now, there's a `func foo()` default implementation for `FooProto` but if
later of `foo` gets refactored to `bar`, we lose the default implementation
which can lead to problems.
Is there anything in Swift (like the `override` keyword) that allows me to say
this is a default implementation and not a new method?
Thanks,
Johannes
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users