Mercurial > projects > ldc
annotate test/arrays4.d @ 103:855adfdb8d38 trunk
[svn r107] Getting .classinfo on a class instance now works (classinfo is stored in vtable)
author | lindquist |
---|---|
date | Sun, 18 Nov 2007 08:25:07 +0100 |
parents | 8b0e809563df |
children | c44e6a711885 |
rev | line source |
---|---|
36
c0967c4b2a74
[svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff
changeset
|
1 module arrays4; |
40 | 2 import std.stdio; |
36
c0967c4b2a74
[svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff
changeset
|
3 void main() |
c0967c4b2a74
[svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff
changeset
|
4 { |
40 | 5 int[] arr; |
6 arr ~= 3; | |
7 assert(arr.length == 1); | |
8 assert(arr[0] == 3); | |
9 arr ~= 5; | |
10 assert(arr.length == 2); | |
11 assert(arr[0] == 3); | |
12 assert(arr[1] == 5); | |
13 writefln(arr); | |
36
c0967c4b2a74
[svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff
changeset
|
14 } |