Don <> changed:

           What    |Removed                     |Added
           Keywords|                            |ice-on-valid-code

--- Comment #6 from Don <> 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() {

alias Stack!int Stuck;

int bug6510() {
    static void UNUSED() {
        Stack!(int) junk;
    Stack!(int) opstk;
    return 3;

static assert(bug6510());

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to