Mercurial > projects > ldc
annotate test/bug27.d @ 52:0c77619e803b trunk
[svn r56] Initial support for TypeInfo.
Enums not work.
Several other bugfixes.
author | lindquist |
---|---|
date | Tue, 23 Oct 2007 05:55:12 +0200 |
parents | |
children |
rev | line source |
---|---|
lindquist@52 | 1 module bug27; |
lindquist@52 | 2 |
lindquist@52 | 3 int func(int a, int b) |
lindquist@52 | 4 { |
lindquist@52 | 5 if (a == b) |
lindquist@52 | 6 return 0; |
lindquist@52 | 7 else if (a < b) |
lindquist@52 | 8 return -1; |
lindquist@52 | 9 else |
lindquist@52 | 10 return 1; |
lindquist@52 | 11 } |
lindquist@52 | 12 |
lindquist@52 | 13 void main() |
lindquist@52 | 14 { |
lindquist@52 | 15 int i = func(3,4); |
lindquist@52 | 16 assert(i == -1); |
lindquist@52 | 17 } |