www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5014] New: is(T U == super) returns non-shared parent types for shared(T)

http://d.puremagic.com/issues/show_bug.cgi?id=5014

           Summary: is(T U == super) returns non-shared parent types for
                    shared(T)
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: sean invisibleduck.org


--- Comment #0 from Sean Kelly <sean invisibleduck.org> 2010-10-07 15:16:56 PDT
---
The following code:

    import std.stdio;
    import std.traits;

    template Bases(T)
    {
        static if(is(T U == super))
            alias U Bases;
        else
            static assert(false);
    }

    void main()
    {
        alias Bases!(shared(Exception)) bases;
        foreach(i, e; bases)
            writeln(bases[i].stringof);
    }

Prints "Throwable" when it should probably print "shared(Throwable)".

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