mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-13 03:13:13 +01:00
35 lines
270 B
D
35 lines
270 B
D
class Foo
|
|
{
|
|
this(int j)
|
|
{
|
|
i = pi = j;
|
|
}
|
|
|
|
int i;
|
|
|
|
private:
|
|
|
|
int pi;
|
|
}
|
|
|
|
class Bar : Foo
|
|
{
|
|
this(int j)
|
|
{
|
|
super(j);
|
|
baz = 42;
|
|
}
|
|
|
|
int baz;
|
|
}
|
|
|
|
void func()
|
|
{
|
|
auto bar = new Bar(12);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
func();
|
|
}
|