comparison dmd/IsExp.d @ 109:ceda59b4d255

expression.c changes, now only ddoc should be left
author Trass3r
date Tue, 31 Aug 2010 22:08:52 +0200
parents 2e2a5c3f943a
children 12c0c84d13fd
comparison
equal deleted inserted replaced
108:6da99741178e 109:ceda59b4d255
81 override Expression semantic(Scope sc) 81 override Expression semantic(Scope sc)
82 { 82 {
83 Type tded; 83 Type tded;
84 84
85 /* is(targ id tok tspec) 85 /* is(targ id tok tspec)
86 * is(targ id : tok2)
86 * is(targ id == tok2) 87 * is(targ id == tok2)
87 */ 88 */
88 89
89 //printf("IsExp.semantic(%s)\n", toChars()); 90 //printf("IsExp.semantic(%s)\n", toChars());
90 if (id && !(sc.flags & SCOPE.SCOPEstaticif)) 91 if (id && !(sc.flags & SCOPE.SCOPEstaticif))
236 { 237 {
237 /* Evaluate to true if targ matches tspec. 238 /* Evaluate to true if targ matches tspec.
238 * If true, declare id as an alias for the specialized type. 239 * If true, declare id as an alias for the specialized type.
239 */ 240 */
240 241
241 MATCH m;
242 assert(parameters && parameters.dim); 242 assert(parameters && parameters.dim);
243 243
244 scope Objects dedtypes = new Objects(); 244 scope Objects dedtypes = new Objects();
245 dedtypes.setDim(parameters.dim); 245 dedtypes.setDim(parameters.dim);
246 dedtypes.zero(); 246 dedtypes.zero();
247 247
248 m = targ.deduceType(null, tspec, parameters, dedtypes); 248 MATCH m = targ.deduceType(null, tspec, parameters, dedtypes);
249 if (m == MATCHnomatch || 249 if (m == MATCHnomatch ||
250 (m != MATCHexact && tok == TOKequal)) 250 (m != MATCHexact && tok == TOKequal))
251 { 251 {
252 goto Lno; 252 goto Lno;
253 } 253 }