mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
24 lines
197 B
D
24 lines
197 B
D
class A
|
|
{
|
|
int i;
|
|
void f()
|
|
{
|
|
printf("A.f\n");
|
|
}
|
|
}
|
|
|
|
class B : A
|
|
{
|
|
long l;
|
|
void f()
|
|
{
|
|
printf("B.f\n");
|
|
}
|
|
}
|
|
|
|
void main()
|
|
{
|
|
A a = new B;
|
|
a.f();
|
|
}
|