Summary: Better Error Message When Using S.tupleof within S
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from David Simcha <> 2012-02-08 08:54:45 PST ---
struct S {
   static if(hasIndirections!(typeof(this))) {}

template hasIndirections(T)
   enum hasIndirections = hasIndirectionsImpl!(typeof(T.init.tupleof));

template hasIndirectionsImpl(T...)
   static if (!T.length)
       enum hasIndirectionsImpl = false;
       enum hasIndirectionsImpl = true;

This is wrong because S isn't fully defined yet, so S.init.tupleof makes no
sense.  However, the error message is extremely obtuse:

Error: struct S no size yet for forward reference

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to