Bug 4170 – Missing line number on compile-time array index

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-05-10T01:25:00Z
Last change time
2014-02-15T02:43:46Z
Keywords
diagnostic, patch
Assigned to
nobody
Creator
simen.kjaras

Comments

Comment #0 by simen.kjaras — 2010-05-10T01:25:16Z
void foo( T... )( T values ) { int[ T.length - 1 ] a; foreach ( i, v; values ) { a[ i ] = 0; } } void main( ) { foo( 1, 2, 3 ); } Gives: Error: array index 2 is out of bounds a[0 .. 2]
Comment #1 by yebblies — 2011-06-09T04:33:08Z
https://github.com/D-Programming-Language/dmd/pull/100 This fixes the missing file/line number, but it currently still prints the error message twice.
Comment #2 by bugzilla — 2011-06-09T12:14:27Z