www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7886] New: derivedMembers infinite recursion

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

           Summary: derivedMembers infinite recursion
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code klickverbot.at



---
Another regression in DMD 2.059 Git (7c22b8a) compared to D 2.058:
---
struct A {
  static if (__traits(derivedMembers, A).length) {}
}
---

The reason is quite obvious from the backtrace, DMD recurses infinitely while
trying to get the list of members even if the static if doesn't add members:
---

traits.c:77

expression.c:5844

expression.c:6450

expression.c:6382

s=0x0) at cond.c:257

sd=0x0) at attrib.c:1242

dg=0x1e9630 <_ZZN9TraitsExp8semanticEP5ScopeEN12PushIdentsDg2dgEPvmP7Dsymbol>,
ctx=0x681b50, pn=0x0) at dsymbol.c:1148
.
.
.
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 10 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7886




Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5e555d5fb8570ce27aafa5cdd4fb29a99e813c76
fix Issue 7886 - derivedMembers infinite recursion

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 10 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7886


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


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