mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
24 lines
423 B
D
24 lines
423 B
D
// https://issues.dlang.org/show_bug.cgi?id=23552
|
|
|
|
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/test23552.d(17): Error: cannot implicitly override base class method `test23552.Base.foo` with `test23552.Derived.foo`; add `override` attribute
|
|
---
|
|
*/
|
|
|
|
abstract class Base
|
|
{
|
|
void foo();
|
|
}
|
|
|
|
class Derived : Base
|
|
{
|
|
void foo() { }
|
|
int data() { return 0; }
|
|
}
|
|
|
|
class DerivedX : Derived
|
|
{
|
|
override int data() { return 1; }
|
|
}
|