[Issue 7835] switch case fallthrough error despite a break inside static foreach
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 6 13:11:25 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7835
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
--- Comment #8 from bearophile_hugs at eml.cc 2012-04-06 13:12:01 PDT ---
(In reply to comment #7)
> Your code is expanded to:
>
> void main() {
> char c = 'b';
> switch (c) {
> case 'a': printf("1 a\n"); break;
> {case 'b': printf("2 %c\n", c); goto break_foreach;}
> {case 'c': printf("2 %c\n", c); goto break_foreach;}
> break_foreach: break;
> default: printf("default");
> }
> }
Thank you again Timon :-) So there is no bug here.
This was not easy to understand for me. (Maybe D newbies will enjoy to read an
example of this in some D tips&trickls somewhere, or maybe it was just a
conceptualization problem of mine.)
Issue closed again, as invalid.
--
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