http://d.puremagic.com/issues/show_bug.cgi?id=4289
Summary: template struct opEquals problem Product: D Version: future Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-06-06 12:30:50 PDT --- The syntax of this D2 code seems correct (removing the const this code used to work in D1): struct Foo(size_t N) { bool opEquals(ref const(Foo!(N))) const { return false; } } alias Foo!(2) Foo2; void main() {} But DMD v2.046 prints at compile-time: test.d(2): Error: function test.Foo!(2).Foo.opEquals type signature should be const bool(ref const(Foo!(2))) not const bool(ref const(Foo!(N))) test.d(6): Error: template instance test.Foo!(2) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------