cr*p, I've pasted too little. Try this one instead..

I'll use a proper diff tool next time..
        /* If e.tupleof
         */
        if (ident == Id::tupleof)
        {
                /* Create a TupleExp out of the fields of the struct e:
                 * (e.field0, e.field1, e.field2, ...)
                 */
                e = e->semantic(sc);    // do this before turning on 
noaccesscheck
                Expressions *exps = new Expressions;
                exps->reserve(sym->members->dim);
                for (size_t i = 0; i < sym->members->dim; i++)
                {   
                        EnumMember *em = ((Dsymbol 
*)sym->members->data[i])->isEnumMember();
                        char* s = em->ident->toChars();
                        Expression *fe = new StringExp(e->loc, s, strlen(s), 
'c');
                        exps->push(fe);
                }
                e = new TupleExp(e->loc, exps);
                Scope sss;
                e = e->semantic(&sss);
                return e;
        }

Reply via email to