[Issue 3796] Result of .stringof is affected by unrelated function declarations
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 13 01:28:00 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3796
Rainer Schuetze <r.sagitario at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |r.sagitario at gmx.de
--- Comment #3 from Rainer Schuetze <r.sagitario at gmx.de> 2010-02-13 01:27:59 PST ---
Here's a test case closely related that's been bugging me:
--- test.d
void foo_a(int a) {}
void foo_b(int b) {}
pragma(msg,"foo_a: " ~ typeof(&foo_a).stringof);
pragma(msg,"foo_b: " ~ typeof(&foo_b).stringof);
--- dmd -c test.d
foo_a: void function(int a)
foo_b: void function(int a)
I'd suggest removing the argument identifiers from the stringof (as the
suggestion of converting back the deco would do); it's not part of the type.
Unfortunately this disables some ctfe magic accessing function arguments (but
that also badly fails sometimes due to this problem). So some fail-safe way to
get the argument identifiers for ctfe would be nice...
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list