http://d.puremagic.com/issues/show_bug.cgi?id=9458
Summary: ModExp generates invalid code against array operands
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: accepts-invalid, wrong-code
Severity: major
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Kenji Hara <[email protected]> 2013-02-05 22:48:41 PST ---
In this code, line 4 is not valid array-operation. But, compiler accepts such
invalid code.
Note that: slice expression MUST appear in LHS operand for valid array
operation.
void main()
{
int[] a = [1, 2, 3];
a = a[] % a[]; // line 4
import std.stdio;
writeln(a); // prints "[]"
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------