mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-16 00:51:49 +01:00
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
This commit is contained in:
24
tests/mini/classes5.d
Normal file
24
tests/mini/classes5.d
Normal file
@@ -0,0 +1,24 @@
|
||||
module classes5;
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
struct S
|
||||
{
|
||||
long l;
|
||||
}
|
||||
|
||||
class C
|
||||
{
|
||||
C c;
|
||||
S s;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
C c = new C;
|
||||
long* lp = void;
|
||||
{c.s.l = 64;}
|
||||
{assert(c.s.l == 64);}
|
||||
{lp = &c.s.l;}
|
||||
{assert(*lp == 64);}
|
||||
printf("classes5 success\n");
|
||||
}
|
||||
Reference in New Issue
Block a user