← Back to index
|
Original Bugzilla link
Bug 3932 – Title: A forward declaration error with a struct.init
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-03-11T06:31:00Z
Last change time
2014-02-15T02:42:32Z
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2010-03-11T06:31:58Z
This D2 code: template Foo(alias something) { enum bool Foo = true; } struct S { int x; } static assert(Foo!(S())); // OK static assert(Foo!(S.init)); // Error void main() {} Raises the following errors: bug.d(4): Error: declaration _D3bug1S6__initZ forward declaration bug.d(8): Error: template instance bug.Foo!(_D3bug1S6__initZ) error instantiating
Comment #1
by andrej.mitrovich — 2012-10-20T08:45:52Z
Seems to work in 2.061.