Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

DmdPatch: dmd.2.046.patch

File dmd.2.046.patch, 1.1 kB (added by maxter, 14 years ago)
  • traits.c

    old new  
    158158        ISDSYMBOL((f = s->isFuncDeclaration()) != NULL && f->isFinal()) 
    159159    } 
    160160#if DMDV2 
     161    else if (ident == Id::parent) 
     162    { 
     163        if (dim != 1) 
     164            goto Ldimerror; 
     165        Object *o = (Object *)args->data[0]; 
     166        Dsymbol *s = getDsymbol(o); 
     167        Dsymbol *parent; 
     168        if (s) 
     169            s = s->toParent(); 
     170        if (!s) 
     171        { 
     172            error("argument has no parent"); 
     173            goto Lfalse; 
     174        } 
     175        return (new DsymbolExp(loc, s))->semantic(sc); 
     176    } 
    161177    else if (ident == Id::isStaticFunction) 
    162178    { 
    163179        ISDSYMBOL((f = s->isFuncDeclaration()) != NULL && !f->needThis()) 
  • idgen.c

    old new  
    306306    { "isLazy" }, 
    307307    { "hasMember" }, 
    308308    { "identifier" }, 
     309    { "parent" }, 
    309310    { "getMember" }, 
    310311    { "getOverloads" }, 
    311312    { "getVirtualFunctions" },