[Bug 124] New: __traits(parent, X.Y) recurs X for template struct X with repeated applications of __traits(parent, ...)

via D.gnu d.gnu at puremagic.com
Mon May 5 20:48:49 PDT 2014


http://bugzilla.gdcproject.org/show_bug.cgi?id=124

            Bug ID: 124
           Summary: __traits(parent, X.Y) recurs X for template struct X
                    with repeated applications of __traits(parent, ...)
           Product: GDC
           Version: development
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gdc
          Assignee: ibuclaw at gdcproject.org
          Reporter: soltanmm at gmail.com

-- BEGIN CODE --

struct A(T)
{
  static struct B {}
}

pragma(msg,__traits(parent,__traits(parent,__traits(parent,A!int.B))));

-- END CODE --

The resulting output is `A!int`.

If this is the intended behavior of the compiler, then it is problematic for
the implementation of `std.traits.fullyQualifiedName`, as the code there (line
340 of std/traits.d) ends up forward referencing itself into oblivion (and
therefore making fullyQualifiedName broken for instances of the above pattern).

I have a feeling it isn't intended, though.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20140506/d250ede0/attachment.html>


More information about the D.gnu mailing list