Thread overview
[Issue 7860] New: Constant fields of forward referenced structs break everything
Apr 08, 2012
Jordi Sayol
Apr 09, 2012
Kenji Hara
April 08, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7860

           Summary: Constant fields of forward referenced structs break
                    everything
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: siegelords_abode@yahoo.com


--- Comment #0 from siegelords_abode@yahoo.com 2012-04-08 12:20:17 PDT ---
This code used to compile fine with DMD 2.058 but is broken in the git version of DMD:

struct A(T)
{
    enum A!(T) test = A!(T)();

    static if(true)
    {
        pragma(msg, "Not printed..."); // Not printed
        enum A!(T) blah = A!(T)();
    }
}

void main()
{
    auto a = A!(char).blah; // Error: no property 'blah' for type 'A!(char)'
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 08, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7860


Jordi Sayol <g.sayol@yahoo.es> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |g.sayol@yahoo.es
   Target Milestone|---                         |2.059


--- Comment #1 from Jordi Sayol <g.sayol@yahoo.es> 2012-04-08 13:08:04 PDT ---
Regression confirmed on Linux 32-bit and 64-bit

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 09, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7860


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-04-08 17:53:55 PDT ---
The root cause is same as bug 7859, and it is already fixed.
Then, the sample code compiles as expected in git head (d16cfe504).

*** This issue has been marked as a duplicate of issue 7859 ***

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