http://d.puremagic.com/issues/show_bug.cgi?id=6176


Andrej Mitrovic <andrej.mitrov...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrov...@gmail.com


--- Comment #21 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2012-01-18 
10:16:13 PST ---
Switch allows more funky code:

import std.stdio;
string a() { return "a"; }
void main()
{
    switch ("a") {
        case a():
            writeln("true");
        default:
    }
}

and:

import std.stdio;
int foo() { return 1; }
void main()
{
    int x;
    switch (x = foo())
    {
        default:
    }
}

`if (x = foo())` can't work, so I don't know why `switch (x = foo())` can.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to