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

Changeset 229

Show
Ignore:
Timestamp:
10/31/09 23:02:07 (15 years ago)
Author:
walter
Message:

bugzilla 3292

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dmd-1.x/src/template.c

    r207 r229  
    42444244 
    42454245            ti = (TemplateInstance *)ti->syntaxCopy(NULL); 
    42464246            id = (Identifier *)ti; 
    42474247        } 
    42484248        ids->data[i] = id; 
    42494249    } 
    42504250 
    42514251    tm = new TemplateMixin(loc, ident, 
    42524252        (Type *)(tqual ? tqual->syntaxCopy() : NULL), 
    42534253        ids, tiargs); 
    42544254    TemplateInstance::syntaxCopy(tm); 
    42554255    return tm; 
    42564256} 
    42574257 
    42584258void TemplateMixin::semantic(Scope *sc) 
    42594259{ 
    42604260#if LOG 
    42614261    printf("+TemplateMixin::semantic('%s', this=%p)\n", toChars(), this); 
    42624262    fflush(stdout); 
    42634263#endif 
    4264     if (semanticRun && 
     4264    if (semanticRun) 
     4265    { 
    42654266    // This for when a class/struct contains mixin members, and 
    42664267    // is done over because of forward references 
    4267     (!parent || !toParent()->isAggregateDeclaration())) 
    4268     { 
     4268    if (parent && toParent()->isAggregateDeclaration()) 
     4269        semanticRun = 1;        // do over 
     4270    else 
     4271    { 
    42694272#if LOG 
    4270     printf("\tsemantic done\n"); 
    4271 #endif 
    4272     return; 
     4273        printf("\tsemantic done\n"); 
     4274#endif 
     4275        return; 
     4276    } 
    42734277    } 
    42744278    if (!semanticRun) 
    42754279    semanticRun = 1; 
    42764280#if LOG 
    42774281    printf("\tdo semantic\n"); 
    42784282#endif 
    42794283    util_progress(); 
    42804284 
    42814285    Scope *scx = NULL; 
    42824286    if (scope) 
    42834287    {   sc = scope; 
    42844288    scx = scope;        // save so we don't make redundant copies 
    42854289    scope = NULL; 
    42864290    } 
    42874291 
    42884292    // Follow qualifications to find the TemplateDeclaration 
    42894293    if (!tempdecl) 
    42904294    {   Dsymbol *s; 
    42914295    int i; 
    42924296    Identifier *id; 
  • trunk/src/template.c

    r223 r229  
    45024502 
    45034503            ti = (TemplateInstance *)ti->syntaxCopy(NULL); 
    45044504            id = (Identifier *)ti; 
    45054505        } 
    45064506        ids->data[i] = id; 
    45074507    } 
    45084508 
    45094509    tm = new TemplateMixin(loc, ident, 
    45104510        (Type *)(tqual ? tqual->syntaxCopy() : NULL), 
    45114511        ids, tiargs); 
    45124512    TemplateInstance::syntaxCopy(tm); 
    45134513    return tm; 
    45144514} 
    45154515 
    45164516void TemplateMixin::semantic(Scope *sc) 
    45174517{ 
    45184518#if LOG 
    45194519    printf("+TemplateMixin::semantic('%s', this=%p)\n", toChars(), this); 
    45204520    fflush(stdout); 
    45214521#endif 
    4522     if (semanticRun && 
     4522    if (semanticRun) 
     4523    { 
    45234524    // This for when a class/struct contains mixin members, and 
    45244525    // is done over because of forward references 
    4525     (!parent || !toParent()->isAggregateDeclaration())) 
    4526     { 
     4526    if (parent && toParent()->isAggregateDeclaration()) 
     4527        semanticRun = 1;        // do over 
     4528    else 
     4529    { 
    45274530#if LOG 
    4528     printf("\tsemantic done\n"); 
    4529 #endif 
    4530     return; 
     4531        printf("\tsemantic done\n"); 
     4532#endif 
     4533        return; 
     4534    } 
    45314535    } 
    45324536    if (!semanticRun) 
    45334537    semanticRun = 1; 
    45344538#if LOG 
    45354539    printf("\tdo semantic\n"); 
    45364540#endif 
    45374541    util_progress(); 
    45384542 
    45394543    Scope *scx = NULL; 
    45404544    if (scope) 
    45414545    {   sc = scope; 
    45424546    scx = scope;        // save so we don't make redundant copies 
    45434547    scope = NULL; 
    45444548    } 
    45454549 
    45464550    // Follow qualifications to find the TemplateDeclaration 
    45474551    if (!tempdecl) 
    45484552    {   Dsymbol *s; 
    45494553    int i; 
    45504554    Identifier *id;