[Issue 4195] New: Forward reference error with struct opCall and const

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 16 04:05:44 PDT 2010


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

           Summary: Forward reference error with struct opCall and const
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: strtr at despam.it


--- Comment #0 from strtr at despam.it 2010-05-16 04:05:42 PDT ---
module main;
//const S S1 = S(); // uncomment this to compile
struct S
{
  float value;
  static S opCall()
  {
    S s;
    return s;
  }
  const S S2 = S();
}
void main(){}
--
main.d(4): Error: struct main.S no size yet for forward reference
main.d(4): Error: struct main.S no size yet for forward reference
main.d(11): Error: cannot evaluate opCall() at compile time

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


More information about the Digitalmars-d-bugs mailing list