comparison dmd/TemplateAliasParameter.d @ 113:3482c73a991b

More cleanup for arrays
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Tue, 31 Aug 2010 23:57:32 +0100
parents 3a0b150c9841
children e28b18c23469
comparison
equal deleted inserted replaced
112:3f02152c5e68 113:3482c73a991b
169 Dsymbol s; 169 Dsymbol s;
170 170
171 //printf("TemplateAliasParameter.matchArg()\n"); 171 //printf("TemplateAliasParameter.matchArg()\n");
172 172
173 if (i < tiargs.dim) 173 if (i < tiargs.dim)
174 oarg = cast(Object)tiargs.data[i]; 174 oarg = tiargs[i];
175 else 175 else
176 { // Get default argument instead 176 { // Get default argument instead
177 oarg = defaultArg(loc, sc); 177 oarg = defaultArg(loc, sc);
178 if (!oarg) 178 if (!oarg)
179 { assert(i < dedtypes.dim); 179 { assert(i < dedtypes.dim);
180 // It might have already been deduced 180 // It might have already been deduced
181 oarg = cast(Object)dedtypes.data[i]; 181 oarg = dedtypes[i];
182 if (!oarg) 182 if (!oarg)
183 goto Lnomatch; 183 goto Lnomatch;
184 } 184 }
185 } 185 }
186 186
217 if (sa == sdummy) 217 if (sa == sdummy)
218 goto Lnomatch; 218 goto Lnomatch;
219 if (sa != specAlias) 219 if (sa != specAlias)
220 goto Lnomatch; 220 goto Lnomatch;
221 } 221 }
222 else if (dedtypes.data[i]) 222 else if (dedtypes[i])
223 { // Must match already deduced symbol 223 { // Must match already deduced symbol
224 Object s_ = cast(Object)dedtypes.data[i]; 224 Object s_ = dedtypes[i];
225 225
226 if (!sa || s_ != sa) 226 if (!sa || s_ != sa)
227 goto Lnomatch; 227 goto Lnomatch;
228 } 228 }
229 dedtypes[i] = sa; 229 dedtypes[i] = sa;