[Issue 4170] New: Missing line number on compile-time array index
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 10 01:25:19 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4170
Summary: Missing line number on compile-time array index
Product: D
Version: 2.041
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: simen.kjaras at gmail.com
--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 2010-05-10 01:25:16 PDT ---
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]
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list