[Issue 2277] New: array ops and const arrays incompatible
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 10 04:02:00 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2277
Summary: array ops and const arrays incompatible
Product: D
Version: 2.018
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: spam at extrawurst.org
[CODE]
void main()
{
const float[] a;
float[] b;
b[] = b[] + a[]; //works fine
b[] += a[]; //compile error
}
[/CODE]
Compiler output (non conformant errors by the way, file,lines missing):
Error: 'c1' is not a scalar, it is a const(float)[]
Error: incompatible types for ((c1) += (p0[p])): 'const(float)[]' and
'const(float)'
Error: 'c1' is not of arithmetic type, it is a const(float)[]
--
More information about the Digitalmars-d-bugs
mailing list