In C++ world this is expected behavior AND it's documented.
But in swift, protocols cannot declare default implementations but it's possible to define implementation to protocol using extensions. So in C++, it might look like this
struct Greeter {
virtual void greet() {
cout << "Hello, world!" << endl;
}
};
struct BaseGreeter: Greeter {};
struct LazyGreeter: BaseGreeter {
void greet() override {
cout << "sup" << endl;
}
};
int main() {
Greeter *greeter = new LazyGreeter();
greeter->greet(); // In C++ prints "sup", but in Swift "Hello, World!"
delete greeter;
return 0;
}
IE: