Mercurial > projects > ldc
comparison dmd/template.c @ 19:788401029ecf trunk
[svn r23] * Updated to DMD 1.021
author | lindquist |
---|---|
date | Thu, 04 Oct 2007 03:42:56 +0200 |
parents | c53b6e3fe49a |
children | 70d6113eeb8c |
comparison
equal
deleted
inserted
replaced
18:c05ef76f1c20 | 19:788401029ecf |
---|---|
1230 else if (ty == Tclass && at->ty == Tclass) | 1230 else if (ty == Tclass && at->ty == Tclass) |
1231 { | 1231 { |
1232 return (MATCH) implicitConvTo(at); | 1232 return (MATCH) implicitConvTo(at); |
1233 } | 1233 } |
1234 else if (ty == Tsarray && at->ty == Tarray && | 1234 else if (ty == Tsarray && at->ty == Tarray && |
1235 next->equals(at->nextOf())) | 1235 nextOf()->equals(at->nextOf())) |
1236 { | 1236 { |
1237 goto Lexact; | 1237 goto Lexact; |
1238 } | 1238 } |
1239 else | 1239 else |
1240 goto Lnomatch; | 1240 goto Lnomatch; |
3276 } | 3276 } |
3277 } | 3277 } |
3278 else if (ea) | 3278 else if (ea) |
3279 { sinteger_t v; | 3279 { sinteger_t v; |
3280 real_t r; | 3280 real_t r; |
3281 unsigned char *p; | |
3282 | 3281 |
3283 if (ea->op == TOKvar) | 3282 if (ea->op == TOKvar) |
3284 { | 3283 { |
3285 sa = ((VarExp *)ea)->var; | 3284 sa = ((VarExp *)ea)->var; |
3286 ea = NULL; | 3285 ea = NULL; |
3296 if (ea->op == TOKtuple) | 3295 if (ea->op == TOKtuple) |
3297 { ea->error("tuple is not a valid template value argument"); | 3296 { ea->error("tuple is not a valid template value argument"); |
3298 continue; | 3297 continue; |
3299 } | 3298 } |
3300 #if 1 | 3299 #if 1 |
3300 /* Use deco that matches what it would be for a function parameter | |
3301 */ | |
3301 buf.writestring(ea->type->deco); | 3302 buf.writestring(ea->type->deco); |
3302 #else | 3303 #else |
3303 // Use type of parameter, not type of argument | 3304 // Use type of parameter, not type of argument |
3304 TemplateParameter *tp = (TemplateParameter *)tempdecl->parameters->data[i]; | 3305 TemplateParameter *tp = (TemplateParameter *)tempdecl->parameters->data[i]; |
3305 assert(tp); | 3306 assert(tp); |