[Issue 9458] New: ModExp generates invalid code against array operands
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 5 22:48:42 PST 2013
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: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list