Mercurial > projects > ldc
annotate tests/mini/a.d @ 864:2025c9a24efd
Adjust error message for missing toConstExp to include 'is not a const exp'.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 20 Dec 2008 09:13:44 +0100 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
1 | 1 module a; |
2 | |
270
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
1
diff
changeset
|
3 extern(C) int printf(char*, ...); |
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
1
diff
changeset
|
4 |
1 | 5 int i = 42; |
6 | |
7 void main() | |
8 { | |
9 int j; | |
10 j = i; | |
11 int* p; | |
12 p = &j; | |
13 int k = *p; | |
14 assert(k == 42); | |
15 | |
16 byte b = -1; | |
17 int i = b; | |
18 assert(i == -1); | |
19 | |
20 int* p2 = p; | |
21 | |
22 printf("Done\n"); | |
23 } |