mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-01 04:23:14 +01:00
[svn r5] Initial commit. Most things are very rough.
This commit is contained in:
23
test/classes2.d
Normal file
23
test/classes2.d
Normal file
@@ -0,0 +1,23 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user