Bug 659 – unclear error message

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2006-12-06T16:37:00Z
Last change time
2015-06-09T05:14:42Z
Keywords
diagnostic
Assigned to
bugzilla
Creator
casantander1

Comments

Comment #0 by casantander1 — 2006-12-06T16:37:53Z
This code gives an unclear error message: //---------------- struct A { int [10] arr; } void main () { A a; a.arr.length = 20; } //---------------- $ gdmd test.d test.d:9: Error: constant (*(&(a) + 0)).length is not an lvalue //----------------
Comment #1 by bugs-d — 2009-03-30T00:42:22Z
In DMD 1.041 and 2.026, the error message is now: name.d(9): Error: constant a.arr.length is not an lvalue Which is a must clearer, and more correct, error message. -[Unknown]