view test/switch3.d @ 129:8096ba7082db trunk

[svn r133] Fixed some problems with inlining not happening :P Fixed problems with certain cases of deeply nested classes/functions.
author lindquist
date Fri, 28 Dec 2007 22:55:24 +0100
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");
}