[Issue 11070] Allow auto statement in a switch statement
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 19 14:49:33 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11070
monarchdodra at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |monarchdodra at gmail.com
--- Comment #3 from monarchdodra at gmail.com 2013-09-19 14:49:31 PDT ---
Well, not just auto, you just want to be able to make a declaration inside the
switch expression. This would also apply to a while statement too.
In C++, this is legal:
//----
while (int i = 1)
{}
switch (int i = 1)
{}
//----
This is a very reduced use case, but I've seen cases where it is useful.
The D grammar does not allow it though. I don't see why not though.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list