Bug 6590 – mixed in case and default statements do not create a new scope

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-09-01T13:28:03Z
Last change time
2024-12-13T17:56:19Z
Keywords
industry
Assigned to
No Owner
Creator
timon.gehr
Moved to GitHub: dmd#18367 →

Comments

Comment #0 by timon.gehr — 2011-09-01T13:28:03Z
consider void main(){ int x; switch(x){ case 0: auto e=1; break; case 1: auto e=2; break; // fine default: auto e=3; break; // fine } switch(x){ case 0: auto e=1; break; mixin("case 1:"); auto e=2; break; //error mixin("default:"); auto e=3; break;// error } } tested with DMD 2.054
Comment #1 by jbc.engelen — 2017-03-18T22:34:42Z
This bug is still present in DMD 2.073.1
Comment #2 by robert.schadek — 2024-12-13T17:56:19Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18367 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB