[svn r126] String switch is now implemented.

A few other fixes.
This commit is contained in:
Tomas Lindquist Olsen
2007-11-27 09:19:07 +01:00
parent ea362d8402
commit 0665531549
6 changed files with 572 additions and 16 deletions

24
test/switch3.d Normal file
View File

@@ -0,0 +1,24 @@
module switch3;
void main()
{
char[] str = "hello";
int i;
switch(str)
{
case "world":
i = 1;
assert(0);
case "hello":
i = 2;
break;
case "a","b","c":
i = 3;
assert(0);
default:
i = 4;
assert(0);
}
assert(i == 2);
printf("SUCCESS\n");
}