digitalmars.D.bugs - [Issue 8579] New: Default parameter appears a part of typeof().stringof of a function variable
- d-bugmail puremagic.com (41/41) Aug 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8579
- d-bugmail puremagic.com (8/8) Aug 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8579
- d-bugmail puremagic.com (12/12) Aug 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8579
- d-bugmail puremagic.com (7/7) Aug 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8579
- d-bugmail puremagic.com (10/10) Sep 05 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8579
- d-bugmail puremagic.com (9/9) Jul 04 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8579
- d-bugmail puremagic.com (7/7) Jul 04 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8579
http://d.puremagic.com/issues/show_bug.cgi?id=8579 Summary: Default parameter appears a part of typeof().stringof of a function variable Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: acehreli yahoo.com This is related to bug 3866. import std.stdio; void func1(int i, double j = 1.0) { } void func2(int i, double j) { } void main() { auto fn1 = &func1; auto fn2 = &func2; assert(typeid(fn1) is typeid(fn2)); // Passes; fine. writeln(typeof(fn1).stringof); writeln(typeof(fn2).stringof); } The output includes the default value and for *both* of the variables: void function(int i, double j = 1) void function(int i, double j = 1) Interestingly, swap the definitions of fn1 and fn2, now neither has the default parameter value: auto fn2 = &func2; auto fn1 = &func1; Now the output: void function(int i, double j) void function(int i, double j) Ali -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8579 Ali Cehreli <acehreli yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P3 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8579 Maxim Fomin <maxim maxim-fomin.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim maxim-fomin.ru --- Here was a discussion (http://www.digitalmars.com/d/archives/digitalmars/D/What_to_do_about_default_function_arguments_164993.html) but seems the decision about default arguments was not made. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8579 I think the decision has been made after that discussion: http://d.puremagic.com/issues/show_bug.cgi?id=3866#c5 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8579 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull https://github.com/D-Programming-Language/dmd/pull/1102 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 05 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8579 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 04 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8579 Fixed commit: https://github.com/D-Programming-Language/dmd/commit/a711eb6b499ca85b7cfa4e758d9e968fef8d315f -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 04 2013