Thread overview
[Issue 1534] New: Can't mix in a case statement.
Sep 26, 2007
d-bugmail
Sep 30, 2007
d-bugmail
Sep 08, 2009
Rainer Schuetze
Sep 08, 2009
Rainer Schuetze
Oct 21, 2009
Don
September 26, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1534

           Summary: Can't mix in a case statement.
           Product: D
           Version: 1.021
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: aziz.kerim@gmail.com


switch(1)
{
mixin("case 0:{}");
case 1:
case 2:
default:
}

Getting this error many times until the compiler aborts aborts: bla.d(...): found 'EOF' instead of statement


-- 

September 30, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1534


thomas-dloop@kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Linux                       |All
           Platform|PC                          |All




------- Comment #1 from thomas-dloop@kuehne.cn  2007-09-30 05:01 -------
Added to DStress as http://dstress.kuehne.cn/run/m/mixin_37_A.d http://dstress.kuehne.cn/run/m/mixin_37_B.d


-- 

September 08, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1534


Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |r.sagitario@gmx.de


--- Comment #2 from Rainer Schuetze <r.sagitario@gmx.de> 2009-09-07 23:14:09 PDT ---
This also happens for DMD 2.032 and before, but here is a patch against that version:

Index: parse.c ===================================================================
--- parse.c    (revision 196)
+++ parse.c    (working copy)
@@ -3720,6 +3720,7 @@
         statements = new Statements();
         while (token.value != TOKcase &&
            token.value != TOKdefault &&
+           token.value != TOKeof &&
            token.value != TOKrcurly)
         {
         statements->push(parseStatement(PSsemi | PScurlyscope));
@@ -3755,6 +3756,7 @@
         statements = new Statements();
         while (token.value != TOKcase &&
            token.value != TOKdefault &&
+           token.value != TOKeof &&
            token.value != TOKrcurly)
         {
         statements->push(parseStatement(PSsemi | PScurlyscope));

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 08, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1534


Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matti.niemenmaa+dbugzilla@i
                   |                            |ki.fi


--- Comment #3 from Rainer Schuetze <r.sagitario@gmx.de> 2009-09-07 23:16:35 PDT ---
*** Issue 2288 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1534


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug@yahoo.com.au
         Resolution|                            |FIXED


--- Comment #4 from Don <clugdbug@yahoo.com.au> 2009-10-21 06:38:58 PDT ---
Fixed DMD1.050 and DMD2.035.

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