Summary: Incorrect memoisation during function parameter name
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from John Aston <> 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()

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:
------- You are receiving this mail because: -------

Reply via email to