Mercurial > projects > ldc
view test/switch3.d @ 176:a074a5ff709c trunk
[svn r192] Fixed: String literals as constant expression was broken for utf16/32.
author | lindquist |
---|---|
date | Wed, 07 May 2008 00:58:36 +0200 |
parents | 36ab367572df |
children | d9d5d59873d8 |
line wrap: on
line source
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"); }