Changeset 498
- Timestamp:
- 05/23/10 20:51:47 (3 years ago)
- Files:
-
- branches/dmd-1.x/src/class.c (modified) (2 diffs)
- branches/dmd-1.x/src/declaration.c (modified) (5 diffs)
- branches/dmd-1.x/src/func.c (modified) (1 diff)
- branches/dmd-1.x/src/mtype.c (modified) (1 diff)
- trunk/src/class.c (modified) (1 diff)
- trunk/src/declaration.c (modified) (2 diffs)
- trunk/src/mtype.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dmd-1.x/src/class.c
r477 r498 662 662 { 663 663 //printf("Creating default this(){} for class %s\n", toChars()); 664 ctor = new CtorDeclaration(loc, 0, NULL, 0);664 CtorDeclaration *ctor = new CtorDeclaration(loc, 0, NULL, 0); 665 665 ctor->fbody = new CompoundStatement(0, new Statements()); 666 666 members->push(ctor); … … 669 669 sc->offset = structsize; 670 670 ctor->semantic(sc); 671 this->ctor = ctor; 671 672 defaultCtor = ctor; 672 673 } branches/dmd-1.x/src/declaration.c
r482 r498 1 1 2 2 // Compiler implementation of the D programming language 3 // Copyright (c) 1999-20 09by Digital Mars3 // Copyright (c) 1999-2010 by Digital Mars 4 4 // All Rights Reserved 5 5 // written by Walter Bright … … 98 98 error(loc, "cannot modify parameter '%s' in contract", toChars()); 99 99 100 if (isCtorinit()) 100 if (sc->incontract && isResult()) 101 error(loc, "cannot modify result '%s' in contract", toChars()); 102 103 if (isCtorinit() && !t->isMutable()) 101 104 { // It's only modifiable if inside the right constructor 102 105 Dsymbol *s = sc->func; … … 477 480 #if DMDV2 478 481 type = type->addStorageClass(storage_class); 479 if (storage_class & (STCref | STCnothrow | STCpure ))482 if (storage_class & (STCref | STCnothrow | STCpure | STCdisable)) 480 483 { // For 'ref' to be attached to function types, and picked 481 484 // up by Type::resolve(), it has to go into sc. 482 485 sc = sc->push(); 483 sc->stc |= storage_class & (STCref | STCnothrow | STCpure | STCshared );486 sc->stc |= storage_class & (STCref | STCnothrow | STCpure | STCshared | STCdisable); 484 487 type->resolve(loc, sc, &e, &t, &s); 485 488 sc = sc->pop(); … … 549 552 } 550 553 } 551 if (!aliassym)552 aliassym = s;554 //printf("setting aliassym %s to %s %s\n", toChars(), s->kind(), s->toChars()); 555 aliassym = s; 553 556 this->inSemantic = 0; 554 557 } … … 671 674 offset = 0; 672 675 noauto = 0; 676 #if DMDV2 677 isargptr = FALSE; 678 #endif 673 679 #if DMDV1 674 680 nestedref = 0; branches/dmd-1.x/src/func.c
r497 r498 150 150 foverrides.setDim(0); // reset in case semantic() is being retried for this function 151 151 152 if (!originalType) 153 originalType = type; 152 154 if (!type->deco) 153 155 { branches/dmd-1.x/src/mtype.c
r496 r498 3804 3804 sc->intypeof++; 3805 3805 exp = exp->semantic(sc); 3806 #if DMDV2 3807 if (exp->type && exp->type->ty == Tfunction && 3808 ((TypeFunction *)exp->type)->isproperty) 3809 exp = resolveProperties(sc, exp); 3810 #endif 3806 3811 sc->intypeof--; 3807 3812 if (exp->op == TOKtype) trunk/src/class.c
r477 r498 350 350 if (!tc->sym->symtab || tc->sym->scope || tc->sym->sizeok == 0) 351 351 { 352 printf("%s: forward reference of base class %s\n", toChars(), tc->sym->toChars());352 //printf("%s: forward reference of base class %s\n", toChars(), tc->sym->toChars()); 353 353 //error("forward reference of base class %s", baseClass->toChars()); 354 354 // Forward reference of base class, try again later trunk/src/declaration.c
r490 r498 1 1 2 2 // Compiler implementation of the D programming language 3 // Copyright (c) 1999-20 09by Digital Mars3 // Copyright (c) 1999-2010 by Digital Mars 4 4 // All Rights Reserved 5 5 // written by Walter Bright … … 461 461 */ 462 462 s = type->toDsymbol(sc); 463 if (s && ((s->getType() && type->equals(s->getType())) || s->isEnumMember())) 463 if (s 464 #if DMDV2 465 && ((s->getType() && type->equals(s->getType())) || s->isEnumMember()) 466 #endif 467 ) 464 468 goto L2; // it's a symbolic alias 465 469 trunk/src/mtype.c
r496 r498 5925 5925 sc->intypeof++; 5926 5926 exp = exp->semantic(sc); 5927 #if DMDV2 5927 5928 if (exp->type && exp->type->ty == Tfunction && 5928 5929 ((TypeFunction *)exp->type)->isproperty) 5929 5930 exp = resolveProperties(sc, exp); 5931 #endif 5930 5932 sc->intypeof--; 5931 5933 if (exp->op == TOKtype)
