[Issue 9417] New: "no size yet for forward reference" error with nested structure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 28 09:54:58 PST 2013
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 at puremagic.com
ReportedBy: maximzms at gmail.com
--- Comment #0 from Maksim Zholudev <maximzms at 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: -------
More information about the Digitalmars-d-bugs
mailing list