Bug 7931 – Error message with _error_ with var[1,2]

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-17T01:41:00Z
Last change time
2015-06-09T05:10:39Z
Keywords
diagnostic, patch
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2012-04-17T01:41:31Z
static assert( undefined[2, 4] == 2); bug.d(9): Error: undefined identifier undefined bug.d(9): Error: only one index allowed to index _error_ index ed4c6c6..de8498e 100644 --- a/src/expression.c +++ b/src/expression.c @@ -9382,6 +9382,8 @@ Expression *ArrayExp::semantic(Scope *sc) #endif UnaExp::semantic(sc); e1 = resolveProperties(sc, e1); + if (e1->op == TOKerror) + return new ErrorExp(); t1 = e1->type->toBasetype(); if (t1->ty != Tclass && t1->ty != Tstruct)
Comment #1 by github-bugzilla — 2012-04-17T20:37:55Z
Comment #2 by github-bugzilla — 2012-04-17T20:38:14Z