digitalmars.D - Expected behavior?
- jdrewsen (18/18) Jul 04 2011 I was just about to send the curl wrapper I've been working on for RFC
- David Nadlinger (7/25) Jul 04 2011 I am not sure if this is actually a »known« issue as in »it's on
- Jonas Drewsen (6/41) Jul 05 2011 Found a matching bug report.
- Jacob Carlborg (4/9) Jul 05 2011 Just declare the struct outside of the function?
- jdrewsen (4/14) Jul 05 2011 That will handle the case as specified in the bug but unfortunately not
- Jacob Carlborg (4/19) Jul 05 2011 I suspected that.
I was just about to send the curl wrapper I've been working on for RFC and did a git pull from upstream to be in sync. After that I got a new error that may be a dmd bug. The following is some minimal code that triggers the error. private mixin template A() { void foo() {} } void bar() { static struct C { mixin A!(); }; } testd.d(6): Error: struct testd.bar.C no size yet for forward reference testd.d(7): Error: mixin testd.bar.C.A!() error instantiating If I move the struct C out of the function body it compiles ok. Note that this did actually work before I did a pull from upstream. Is this a known issue? /Jonas
Jul 04 2011
I am not sure if this is actually a »known« issue as in »it's on Bugzilla«, but it also happens with unittest blocks. I was just about to start tracking this issue down in a big pile of CTFE-heavy code (https://github.com/klickverbot/thrift/blob/d-gsoc/lib/d/src/th ift/codegen.d#L416) – thanks for the post. ;) David On 7/4/11 11:32 PM, jdrewsen wrote:I was just about to send the curl wrapper I've been working on for RFC and did a git pull from upstream to be in sync. After that I got a new error that may be a dmd bug. The following is some minimal code that triggers the error. private mixin template A() { void foo() {} } void bar() { static struct C { mixin A!(); }; } testd.d(6): Error: struct testd.bar.C no size yet for forward reference testd.d(7): Error: mixin testd.bar.C.A!() error instantiating If I move the struct C out of the function body it compiles ok. Note that this did actually work before I did a pull from upstream. Is this a known issue? /Jonas
Jul 04 2011
Found a matching bug report. http://d.puremagic.com/issues/show_bug.cgi?id=2458 Doesn't seem to have caught any attention so it seems I have to hack around it :( /Jonas On 04/07/11 23.40, David Nadlinger wrote:I am not sure if this is actually a »known« issue as in »it's on Bugzilla«, but it also happens with unittest blocks. I was just about to start tracking this issue down in a big pile of CTFE-heavy code (https://github.com/klickverbot/thrift/blob/d-gsoc/lib/d/src/thrift/codegen.d#L416) – thanks for the post. ;) David On 7/4/11 11:32 PM, jdrewsen wrote:I was just about to send the curl wrapper I've been working on for RFC and did a git pull from upstream to be in sync. After that I got a new error that may be a dmd bug. The following is some minimal code that triggers the error. private mixin template A() { void foo() {} } void bar() { static struct C { mixin A!(); }; } testd.d(6): Error: struct testd.bar.C no size yet for forward reference testd.d(7): Error: mixin testd.bar.C.A!() error instantiating If I move the struct C out of the function body it compiles ok. Note that this did actually work before I did a pull from upstream. Is this a known issue? /Jonas
Jul 05 2011
On 2011-07-05 09:51, Jonas Drewsen wrote:Found a matching bug report. http://d.puremagic.com/issues/show_bug.cgi?id=2458 Doesn't seem to have caught any attention so it seems I have to hack around it :( /JonasJust declare the struct outside of the function? -- /Jacob Carlborg
Jul 05 2011
Den 05-07-2011 13:21, Jacob Carlborg skrev:On 2011-07-05 09:51, Jonas Drewsen wrote:That will handle the case as specified in the bug but unfortunately not my actual problem. I'll figure it out - but thanks for the idea. /JonasFound a matching bug report. http://d.puremagic.com/issues/show_bug.cgi?id=2458 Doesn't seem to have caught any attention so it seems I have to hack around it :( /JonasJust declare the struct outside of the function?
Jul 05 2011
On 2011-07-05 22:58, jdrewsen wrote:Den 05-07-2011 13:21, Jacob Carlborg skrev:I suspected that. -- /Jacob CarlborgOn 2011-07-05 09:51, Jonas Drewsen wrote:That will handle the case as specified in the bug but unfortunately not my actual problem. I'll figure it out - but thanks for the idea. /JonasFound a matching bug report. http://d.puremagic.com/issues/show_bug.cgi?id=2458 Doesn't seem to have caught any attention so it seems I have to hack around it :( /JonasJust declare the struct outside of the function?
Jul 05 2011