Mercurial > projects > ldc
annotate test/classes5.d @ 94:61615fa85940 trunk
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
Added support for array .sort and .reverse properties.
Fixed some bugs with pointer arithmetic.
Disabled some DMD AST optimizations that was messing things up, destroying valuable information.
Added a KDevelop project file, this is what I use for coding LLVMDC now :)
Other minor stuff.
author | lindquist |
---|---|
date | Mon, 12 Nov 2007 06:32:46 +0100 |
parents | 5e69b77a5c51 |
children | d9d5d59873d8 |
rev | line source |
---|---|
6 | 1 module classes5; |
2 | |
3 struct S | |
4 { | |
5 long l; | |
6 } | |
7 | |
8 class C | |
9 { | |
10 C c; | |
11 S s; | |
12 } | |
13 | |
14 void main() | |
15 { | |
8
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
16 C c = new C; |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
17 long* lp = void; |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
18 {c.s.l = 64;} |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
19 {assert(c.s.l == 64);} |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
20 {lp = &c.s.l;} |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
21 {assert(*lp == 64);} |
5e69b77a5c51
[svn r12] fixed accessing aggregate fields of aggregates
lindquist
parents:
6
diff
changeset
|
22 printf("classes5 success\n"); |
6 | 23 } |