http://d.puremagic.com/issues/show_bug.cgi?id=6510
Don <clugd...@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code --- Comment #6 from Don <clugd...@yahoo.com.au> 2011-08-17 08:34:41 PDT --- Reduced slightly further. If you uncomment the alias, everything works. So this is a bug which only happens when the semantic pass, and the inlining, is run on Stack!int *during* CTFE. The stack.shrink() call gets translated into: ref Proxy ths = this.stack; which CTFE chokes on. Note that this is a local reference variable, which isn't legal D (it can only happen in compiler-generated code). When the alias is present, the inline scan of bug6510() doesn't happen until after CTFE has finished. But interestingly an inline scan of UNUSED() still happens during CTFE. --- struct Stack(U) { struct Proxy { void shrink() {} } Proxy stack; void pop() { stack.shrink(); } } alias Stack!int Stuck; int bug6510() { static void UNUSED() { Stack!(int) junk; junk.pop(); } Stack!(int) opstk; opstk.pop(); return 3; } static assert(bug6510()); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------