Mercurial > projects > ldc
comparison test/arrays4.d @ 175:c44e6a711885 trunk
[svn r191] Fixed: array literals did not support all type/storage combinations.
Fixed: with expression had broke somewhere along the way.
author | lindquist |
---|---|
date | Wed, 07 May 2008 00:01:13 +0200 |
parents | 8b0e809563df |
children |
comparison
equal
deleted
inserted
replaced
174:16e676ae5ab4 | 175:c44e6a711885 |
---|---|
1 module arrays4; | 1 module arrays4; |
2 import std.stdio; | 2 |
3 void main() | 3 void main() |
4 { | 4 { |
5 int[] arr; | 5 int[] arr; |
6 arr ~= 3; | 6 arr ~= 3; |
7 assert(arr.length == 1); | 7 assert(arr.length == 1); |
8 assert(arr[0] == 3); | 8 assert(arr[0] == 3); |
9 arr ~= 5; | 9 arr ~= 5; |
10 assert(arr.length == 2); | 10 assert(arr.length == 2); |
11 assert(arr[0] == 3); | 11 assert(arr[0] == 3); |
12 assert(arr[1] == 5); | 12 assert(arr[1] == 5); |
13 writefln(arr); | |
14 } | 13 } |