comparison dmd/declaration.c @ 1358:78038e540342

Fix overload resolution issue in dmd bug 313/314 fix.
author Christian Kamm <kamm incasoftware de>
date Sat, 16 May 2009 12:17:33 +0200
parents 0c03ba6f7c24
children 194852badf8c
comparison
equal deleted inserted replaced
1357:48747003a5de 1358:78038e540342
367 this->htype = NULL; 367 this->htype = NULL;
368 this->haliassym = NULL; 368 this->haliassym = NULL;
369 #endif 369 #endif
370 this->overnext = NULL; 370 this->overnext = NULL;
371 this->inSemantic = 0; 371 this->inSemantic = 0;
372 this->importprot = PROTundefined;
372 assert(type); 373 assert(type);
373 } 374 }
374 375
375 AliasDeclaration::AliasDeclaration(Loc loc, Identifier *id, Dsymbol *s) 376 AliasDeclaration::AliasDeclaration(Loc loc, Identifier *id, Dsymbol *s)
376 : Declaration(id) 377 : Declaration(id)
499 else 500 else
500 { 501 {
501 FuncDeclaration *f = s->toAlias()->isFuncDeclaration(); 502 FuncDeclaration *f = s->toAlias()->isFuncDeclaration();
502 if (f) 503 if (f)
503 { 504 {
505 FuncAliasDeclaration *fa = new FuncAliasDeclaration(f);
506 fa->importprot = importprot;
504 if (overnext) 507 if (overnext)
505 { 508 {
506 FuncAliasDeclaration *fa = new FuncAliasDeclaration(f);
507 if (!fa->overloadInsert(overnext)) 509 if (!fa->overloadInsert(overnext))
508 ScopeDsymbol::multiplyDefined(0, f, overnext); 510 ScopeDsymbol::multiplyDefined(0, f, overnext);
509 overnext = NULL; 511 overnext = NULL;
510 s = fa; 512 }
511 s->parent = sc->parent; 513 s = fa;
512 } 514 s->parent = sc->parent;
513 } 515 }
514 if (overnext) 516 if (overnext)
515 ScopeDsymbol::multiplyDefined(0, s, overnext); 517 ScopeDsymbol::multiplyDefined(0, s, overnext);
516 if (s == this) 518 if (s == this)
517 { 519 {