← Back to index
|
Original Bugzilla link
Bug 1534 – Can't mix in a case statement.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-09-26T08:34:00Z
Last change time
2014-02-17T22:51:30Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
aziz.koeksal
Comments
Comment #0
by aziz.koeksal — 2007-09-26T08:34:58Z
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
Comment #1
by thomas-dloop — 2007-09-30T05:01:25Z
Added to DStress as
http://dstress.kuehne.cn/run/m/mixin_37_A.d
http://dstress.kuehne.cn/run/m/mixin_37_B.d
Comment #2
by r.sagitario — 2009-09-07T23:14:09Z
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));
Comment #3
by r.sagitario — 2009-09-07T23:16:35Z
*** Issue 2288 has been marked as a duplicate of this issue. ***
Comment #4
by clugdbug — 2009-10-21T06:38:58Z
Fixed DMD1.050 and DMD2.035.