www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9417] New: "no size yet for forward reference" error with nested structure

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

           Summary: "no size yet for forward reference" error with nested
                    structure
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: maximzms gmail.com


--- Comment #0 from Maksim Zholudev <maximzms gmail.com> 2013-01-28 09:54:56
PST ---
Code:
--------------------
mixin template Foo()
{
    void foo() {}
}

void main()
{
    struct B
    {
        mixin Foo;
    }
}
--------------------

Compiler output:
--------------------
test.d(9): Error: struct test.main.B no size yet for forward reference
test.d(10): Error: mixin test.main.B.Foo!() error instantiating
--------------------

Observations:
- This error appears only with DMD from Git head, no error with v2.060.
- No error if the structure is placed outside main()
- No error if template has no function inside
- The same error appears if structure is placed inside a unittest block
- No error if the structure is placed inside other structure or class

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 28 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9417


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
           Platform|x86_64                      |All
         OS/Version|Linux                       |All


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-04-06 06:26:28 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1851

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |2korden gmail.com


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2013-04-06 10:52:17 PDT ---
*** Issue 2458 has been marked as a duplicate of this issue. ***

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



--- Comment #3 from github-bugzilla puremagic.com 2013-04-06 16:09:05 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/34cd64232af44baba392f7f860f9603750ef82c9
fix Issue 9417 - "no size yet for forward reference" error with nested
structure

https://github.com/D-Programming-Language/dmd/commit/5159d931eab483427bf6cc60b9b39dcdabc24c6c
Merge pull request #1851 from 9rnsr/fix9417

Issue 9417 - "no size yet for forward reference" error with nested structure

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


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 06 2013