Bug 8641 – Multiple errors on accessing undefined identifier

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-09-11T08:18:00Z
Last change time
2013-11-24T08:06:24Z
Keywords
diagnostic
Assigned to
nobody
Creator
maxim

Comments

Comment #0 by maxim — 2012-09-11T08:18:43Z
union MutableConst(T, bool isDefaultMutable) { const T c; T i; static if (isMutable) //bug alias i this; else alias c this; } struct S { MutableConst!(int, false) val; } void main() { } DMD produces three times error "hello.d(5): Error: undefined identifier isMutable " and then crashes.
Comment #1 by andrej.mitrovich — 2013-02-04T13:40:30Z
Not an ICE since 2.061, however the diagnostic prints out too many errors: test.d(5): Error: undefined identifier isMutable test.d(5): Error: undefined identifier isMutable test.d(5): Error: undefined identifier isMutable test.d(5): Error: undefined identifier isMutable test.d(13): Error: template instance test.MutableConst!(int, false) error instantiating
Comment #2 by yebblies — 2013-11-24T08:06:24Z
DMD v2.065 DEBUG testx.d(5): Error: undefined identifier isMutable testx.d(13): Error: template instance testx.MutableConst!(int, false) error instantiating