The following code will first cause the error "A function with the same name and parameters already exists", and then crash:
class Foo
{
void a() {}
void a() {}
}
class Bar : Foo
{
void a() override {}
}
class FooBar : Bar
{
}
void Test()
{
FooBar@ b = FooBar();
b.a();
}
The empty FooBar class inheriting Bar is required, it doesn't crash without.