Changeset 615
- Timestamp:
- 08/11/10 02:47:39 (14 years ago)
- Files:
-
- trunk/src/expression.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/expression.c
r590 r615 7133 7133 goto Lagain; 7134 7134 } 7135 7135 7136 7136 accessCheck(loc, sc, NULL, f); 7137 7137 7138 7138 ve->var = f; 7139 7139 // ve->hasOverloads = 0; 7140 7140 ve->type = f->type; 7141 7141 t1 = f->type; 7142 7142 } 7143 7143 assert(t1->ty == Tfunction); 7144 7144 tf = (TypeFunction *)(t1); 7145 7145 7146 7146 Lcheckargs: 7147 7147 assert(tf->ty == Tfunction); 7148 7148 7149 7149 if (!arguments) 7150 7150 arguments = new Expressions(); 7151 7151 type = functionParameters(loc, sc, tf, arguments); 7152 7152 7153 if (!type && f && f->scope) 7154 { f->semantic3(f->scope); 7155 type = f->type->nextOf(); 7156 } 7157 7153 7158 if (!type) 7154 7159 { 7155 7160 error("forward reference to inferred return type of function call %s", toChars()); 7156 7161 return new ErrorExp(); 7157 7162 } 7158 7163 7159 7164 if (f && f->tintro) 7160 7165 { 7161 7166 Type *t = type; 7162 7167 int offset = 0; 7163 7168 TypeFunction *tf = (TypeFunction *)f->tintro; 7164 7169 7165 7170 if (tf->next->isBaseOf(t, &offset) && offset) 7166 7171 { 7167 7172 type = tf->next; 7168 7173 return castTo(sc, t); 7169 7174 } 7170 7175 } 7171 7176 7172 7177 return this;
