[Issue 8106] New: func.stringof with default args
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 16 00:52:42 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8106
Summary: func.stringof with default args
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: turkeyman at gmail.com
--- Comment #0 from Manu <turkeyman at gmail.com> 2012-05-16 00:54:13 PDT ---
func.stringof is the only existing way to deeply introspect function calling
information past it's argument types (I need argument names, default
arguments), so I rely on this very heavily.
There are some annoying cases where it doesn't work as expected though:
struct Colour
{
ubyte a,r,g,b;
immutable Colour white = Colour(255,255,255,255);
}
void func(Colour c = Colour.white)
func.stringof == "void func(Colour c = white)"
Error: undefined identifier white
For some reason the scope Colour. was removed from the initialiser.
--
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