www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2069] New: Invalid return type for __traits(derivedMembers, ...) if there are no derived members

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2069

           Summary: Invalid return type for __traits(derivedMembers, ...) if
                    there are no derived members
           Product: D
           Version: 2.013
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: samukha voliacable.com


If the type passed to __traits(derivedMembers, ...) does not have any derived
members, an array of void[0u] type is returned instead of
invariant(char)[][0u]; 

class C
{
    //int x; // uncomment to make it compile
}

static assert (is (typeof(__traits(derivedMembers, C)) : string[]));


-- 
May 05 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2069


Hoenir <mrmocool gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |mrmocool gmx.de
         Resolution|                            |FIXED



This was "fixed" in r360 since derivedMembers now returns a tuple instead of an
array literal.

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