digitalmars.D.bugs - [Issue 5752] New: Incorrect memoisation during function parameter name introspection
- d-bugmail puremagic.com (42/42) Mar 19 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5752
- d-bugmail puremagic.com (12/12) Jun 12 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5752
http://d.puremagic.com/issues/show_bug.cgi?id=5752 Summary: Incorrect memoisation during function parameter name introspection Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: johnaston.dev gmail.com --- Comment #0 from John Aston <johnaston.dev gmail.com> 2011-03-19 04:04:52 PDT --- import std.stdio; int funcOne(int paramOne) { return paramOne + 1; } int funcOther(int paramOther) { return paramOther + 1; } void printFunc(alias f)() { writeln(__traits(identifier,f)," : ",(typeof(&f)).stringof); } void main() { printFunc!funcOne(); printFunc!funcOther(); } The above code returns on dmd.2.052: funcOne : int function(int paramOne) funcOther : int function(int paramOne) Since the stringof property goes via the type rather than the alias, two functions with different parameter names but the same type signature will be confused. The extraction of the parameter names I find very useful for automatic function reflection. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 19 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5752 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies gmail.com Resolution| |DUPLICATE --- Comment #1 from yebblies <yebblies gmail.com> 2011-06-12 14:55:18 PDT --- *** This issue has been marked as a duplicate of issue 3358 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 12 2011