[Issue 10073] New: Default opEquals depends on class declaration order with DMD HEAD
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 12 23:41:58 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10073
Summary: Default opEquals depends on class declaration order
with DMD HEAD
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: puneet at coverify.org
--- Comment #0 from Puneet Goel <puneet at coverify.org> 2013-05-12 23:41:51 PDT ---
Error shows up with:
commit 4fbc77fa504c2d8ee4c7ef10edc70221a74742c3
Merge: 081c92a ce58435
Author: Hara Kenji <k.hara.pg+dev at gmail.com>
Date: Sun May 12 21:34:15 2013 -0700
Here is the reduced testcase. Error disappears if I move definition of Foo
(line 16) anywhere before definition of Bar (line 13).
struct Arr(T) { // 1
T[] dArr; // 2
alias dArr this; // 3
bool opEquals(Arr!T d) { // 4
foreach(idx, it; d) { // 5
if(this[idx] != it) { // 6
return false; // 7
} // 8
} // 9
return true; // 10
} // 11
} // 12
class Bar { // 13
Arr!Foo fooQ; // 14
} // 15
class Foo {} // 16
void main() {} // 17
--
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