digitalmars.D.bugs - [Issue 4749] New: Templated & non-templated constructors conflicting
- d-bugmail puremagic.com (42/42) Aug 28 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4749
- d-bugmail puremagic.com (6/6) Aug 28 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4749
- d-bugmail puremagic.com (6/6) Aug 28 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4749
- d-bugmail puremagic.com (11/11) Feb 06 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4749
- d-bugmail puremagic.com (17/17) Aug 02 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4749
- d-bugmail puremagic.com (12/12) Jul 20 2013 http://d.puremagic.com/issues/show_bug.cgi?id=4749
http://d.puremagic.com/issues/show_bug.cgi?id=4749 Summary: Templated & non-templated constructors conflicting Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: mitch.hayenga gmail.com PDT --- I don't have a D compiler on me at the moment, but this came up earlier today. Heres a simplified case. // This breaks due to the constructors (template error message from DMD) struct A { Variant v; string s; this(T)(T val, string str) { v = Variant(val); str = s; } this(int val) { v = val; } } // This works struct A { Variant v; string s; this(T)(T val, string str) { v = Variant(val); str = s; } this(T)(int val) { // Useless template parameter v = val; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 28 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4749 PDT --- Btw, oops bugs in that code. Swapped s & str in the assignment. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 28 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4749 PDT --- Also likely the same bug as 2972. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 28 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4749 Brad Roberts <braddr puremagic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|x86_64 |x86 --- Mass migration of bugs marked as x86-64 to just x86. The platform run on isn't what's relevant, it's if the app is a 32 or 64 bit app. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 06 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4749 simendsjo <simendsjo gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simendsjo gmail.com A smaller test case: struct S { this()(int v) {} this(char[] v) {} } t.d(3): Error: constructor t.S.this conflicts with template t.S.__ctor() at t.d( 2) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 02 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4749 Jonathan M Davis <jmdavisProg gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jmdavisProg gmx.com Resolution| |DUPLICATE PDT --- *** This issue has been marked as a duplicate of issue 1528 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 20 2013