Changeset 407
- Timestamp:
- 03/04/10 02:16:15 (2 years ago)
- Files:
-
- trunk/src/func.c (modified) (3 diffs)
- trunk/src/mtype.c (modified) (2 diffs)
- trunk/src/mtype.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/func.c
r406 r407 2003 2003 */ 2004 2004 match = (MATCH) tf->callMatch(f->needThis() && !f->isCtorDeclaration() ? p->ethis : NULL, arguments); 2005 //printf("test : match = %d\n", match);2005 //printf("test1: match = %d\n", match); 2006 2006 if (match != MATCHnomatch) 2007 2007 { … … 2165 2165 #if LOG_LEASTAS 2166 2166 printf("%s.leastAsSpecialized(%s)\n", toChars(), g->toChars()); 2167 printf("%s, %s\n", type->toChars(), g->type->toChars()); 2167 2168 #endif 2168 2169 … … 2210 2211 } 2211 2212 2212 MATCH m = (MATCH) tg->callMatch(NULL, &args );2213 MATCH m = (MATCH) tg->callMatch(NULL, &args, 1); 2213 2214 if (m) 2214 2215 { trunk/src/mtype.c
r402 r407 4858 4858 * 'args' are being matched to function 'this' 4859 4859 * Determine match level. 4860 * Input: 4861 * flag 1 performing a partial ordering match 4860 4862 * Returns: 4861 4863 * MATCHxxxx 4862 4864 */ 4863 4865 4864 int TypeFunction::callMatch(Expression *ethis, Expressions *args )4866 int TypeFunction::callMatch(Expression *ethis, Expressions *args, int flag) 4865 4867 { 4866 4868 //printf("TypeFunction::callMatch() %s\n", toChars()); … … 4938 4940 else 4939 4941 { 4940 m = arg->implicitConvTo(p->type); 4942 //printf("%s of type %s implicitConvTo %s\n", arg->toChars(), arg->type->toChars(), p->type->toChars()); 4943 if (flag) 4944 // for partial ordering, value is an irrelevant mockup, just look at the type 4945 m = arg->type->implicitConvTo(p->type); 4946 else 4947 m = arg->implicitConvTo(p->type); 4948 //printf("match %d\n", m); 4941 4949 if (p->type->isWild()) 4942 4950 { trunk/src/mtype.h
r402 r407 563 563 bool parameterEscapes(Parameter *p); 564 564 565 int callMatch(Expression *ethis, Expressions *toargs );565 int callMatch(Expression *ethis, Expressions *toargs, int flag = 0); 566 566 type *toCtype(); 567 567 enum RET retStyle();
