digitalmars.D.bugs - [Issue 5771] New: Template constructor auto ref and do not work
- d-bugmail puremagic.com (38/38) Mar 23 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5771
- d-bugmail puremagic.com (11/11) Apr 16 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5771
- d-bugmail puremagic.com (12/12) May 28 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5771
http://d.puremagic.com/issues/show_bug.cgi?id=5771 Summary: Template constructor auto ref and do not work Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: k.hara.pg gmail.com --- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2011-03-23 07:00:57 PDT --- Test code: ---- struct S { this(A)(auto ref A a){} // line 3 } void main() { S s = S(10); } ---- Line 3 causes error 'Error: auto can only be used for template function parameters'. Workaround is follows: ---- struct S { template __ctor(A){ // workaround ref typeof(this) __ctor(auto ref A a){ ...; return this; } } } ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 23 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5771 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, rejects-valid --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2011-04-16 19:30:15 PDT --- Patch posted. https://github.com/D-Programming-Language/dmd/pull/30 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 16 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5771 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED --- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2011-05-28 15:12:01 PDT --- https://github.com/D-Programming-Language/dmd/commit/37e51929c93b6e3ed0c6ed719607b5673c6b171a -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 28 2011