Thread overview
[Issue 10502] New: Can't get fullyQualifiedName of a templated struct
Jun 29, 2013
Dicebot
June 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10502

           Summary: Can't get fullyQualifiedName of a templated struct
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: develop32@gmail.com


--- Comment #0 from Justinas Šneideris <develop32@gmail.com> 2013-06-29 09:57:06 PDT ---
void main()
{
    struct Data(T)
    {
        T[16] stuff;
    }

    import std.traits;
    auto name = fullyQualifiedName!(Data!long);
}

Currently this or anything similar does not work. Compiler complaints about "forward reference of variable parentPrefix" in std.traits (300).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10502



--- Comment #1 from Justinas Šneideris <develop32@gmail.com> 2013-06-29 10:04:15 PDT ---
(In reply to comment #0)
> void main()
> {
>     struct Data(T)
>     {
>         T[16] stuff;
>     }
> 
>     import std.traits;
>     auto name = fullyQualifiedName!(Data!long);
> }
> 
> Currently this or anything similar does not work. Compiler complaints about "forward reference of variable parentPrefix" in std.traits (300).

Its not about structs, any template does not work, be that class, struct or function. Am I missing something?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10502


Dicebot <m.strashun@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m.strashun@gmail.com


--- Comment #2 from Dicebot <m.strashun@gmail.com> 2013-06-29 10:12:46 PDT ---
It was an oversight when extending fullyQualifiedName for wider usage. Implementation for template types is currently discussed (there are lot of tricky parts in it).

You can still use fullyQualifiedName!Data and add template parameter to string representation manually if it absolutely needed as a temporary workaround.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------