Bug 17834 – ICE on switch-local case variable

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-09-17T19:11:57Z
Last change time
2017-09-17T19:35:32Z
Keywords
ice
Assigned to
No Owner
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2017-09-17T19:11:57Z
void main(){ switch(2){ int i=2; case i:{} default: } } DMD v2.076.0 gives: tt.d(5): Deprecation: case variables have to be const or immutable tt.d(3): Deprecation: 'switch' skips declaration of variable tt.main.i at tt.d(4) Internal error: ddmd/backend/symbol.c 1039
Comment #1 by ibuclaw — 2017-09-17T19:35:32Z
I was just a little too quick for you. *** This issue has been marked as a duplicate of issue 17831 ***