[Issue 8638] New: built-in array opSliceAssign fails with user defined opAssign
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 10 06:35:03 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8638
Summary: built-in array opSliceAssign fails with user defined
opAssign
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 2012-09-10 06:35:34 PDT ---
In a word:
--------
struct S
{
void opAssign(int j);
}
void main()
{
int[] i;
i[] = 5; //Here1
S[] s;
s[] = 5; //Here2
}
--------
Actual behavior:
Here2: Error: cannot implicitly convert expression (5) of type int to S[]
Expected behavior:
Here2: opAssign(5) is called for each member of s, just like for Here1.
Ditto for all other flavors of opSliceSomething.
--
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