Changeset 604
- Timestamp:
- 08/06/10 06:39:19 (14 years ago)
- Files:
-
- branches/dmd-1.x/src/mtype.c (modified) (1 diff)
- trunk/src/mtype.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dmd-1.x/src/mtype.c
r569 r604 4726 4726 4727 4727 if (de->e1->op == TOKimport) 4728 4728 { 4729 4729 ScopeExp *se = (ScopeExp *)de->e1; 4730 4730 4731 4731 s = se->sds->search(e->loc, ident, 0); 4732 4732 e = de->e1; 4733 4733 goto L1; 4734 4734 } 4735 4735 } 4736 4736 4737 4737 if (ident == Id::tupleof) 4738 4738 { 4739 4739 /* Create a TupleExp 4740 4740 */ 4741 4741 e = e->semantic(sc); // do this before turning on noaccesscheck 4742 4742 Expressions *exps = new Expressions; 4743 4743 exps->reserve(sym->fields.dim); 4744 4744 for (size_t i = 0; i < sym->fields.dim; i++) 4745 4745 { VarDeclaration *v = (VarDeclaration *)sym->fields.data[i]; 4746 // Don't include hidden 'this' pointer 4747 if (v->isThisDeclaration()) 4748 continue; 4746 4749 Expression *fe = new DotVarExp(e->loc, e, v); 4747 4750 exps->push(fe); 4748 4751 } 4749 4752 e = new TupleExp(e->loc, exps); 4750 4753 sc = sc->push(); 4751 4754 sc->noaccesscheck = 1; 4752 4755 e = e->semantic(sc); 4753 4756 sc->pop(); 4754 4757 return e; 4755 4758 } 4756 4759 4757 4760 s = sym->search(e->loc, ident, 0); 4758 4761 L1: 4759 4762 if (!s) 4760 4763 { 4761 4764 // See if it's a base class 4762 4765 ClassDeclaration *cbase; 4763 4766 for (cbase = sym->baseClass; cbase; cbase = cbase->baseClass) 4764 4767 { 4765 4768 if (cbase->ident->equals(ident)) trunk/src/mtype.c
r598 r604 7118 7118 7119 7119 if (de->e1->op == TOKimport) 7120 7120 { 7121 7121 ScopeExp *se = (ScopeExp *)de->e1; 7122 7122 7123 7123 s = se->sds->search(e->loc, ident, 0); 7124 7124 e = de->e1; 7125 7125 goto L1; 7126 7126 } 7127 7127 } 7128 7128 7129 7129 if (ident == Id::tupleof) 7130 7130 { 7131 7131 /* Create a TupleExp 7132 7132 */ 7133 7133 e = e->semantic(sc); // do this before turning on noaccesscheck 7134 7134 Expressions *exps = new Expressions; 7135 7135 exps->reserve(sym->fields.dim); 7136 7136 for (size_t i = 0; i < sym->fields.dim; i++) 7137 7137 { VarDeclaration *v = (VarDeclaration *)sym->fields.data[i]; 7138 // Don't include hidden 'this' pointer 7139 if (v->isThisDeclaration()) 7140 continue; 7138 7141 Expression *fe = new DotVarExp(e->loc, e, v); 7139 7142 exps->push(fe); 7140 7143 } 7141 7144 e = new TupleExp(e->loc, exps); 7142 7145 sc = sc->push(); 7143 7146 sc->noaccesscheck = 1; 7144 7147 e = e->semantic(sc); 7145 7148 sc->pop(); 7146 7149 return e; 7147 7150 } 7148 7151 7149 7152 s = sym->search(e->loc, ident, 0); 7150 7153 L1: 7151 7154 if (!s) 7152 7155 { 7153 7156 // See if it's a base class 7154 7157 ClassDeclaration *cbase; 7155 7158 for (cbase = sym->baseClass; cbase; cbase = cbase->baseClass) 7156 7159 { 7157 7160 if (cbase->ident->equals(ident))
