Mercurial > projects > ddmd
comparison dmd/InterfaceDeclaration.d @ 64:4290d870944a
More fixes
author | korDen |
---|---|
date | Mon, 23 Aug 2010 20:29:15 +0400 |
parents | 460959608115 |
children | 2e2a5c3f943a |
comparison
equal
deleted
inserted
replaced
63:cab4c37afb89 | 64:4290d870944a |
---|---|
290 return false; | 290 return false; |
291 } | 291 } |
292 | 292 |
293 bool isBaseOf(BaseClass bc, int* poffset) | 293 bool isBaseOf(BaseClass bc, int* poffset) |
294 { | 294 { |
295 assert(false); | 295 //printf("%s.InterfaceDeclaration.isBaseOf(bc = '%s')\n", toChars(), bc.base.toChars()); |
296 for (uint j = 0; j < bc.baseInterfaces.length; j++) | |
297 { | |
298 BaseClass b = bc.baseInterfaces[j]; | |
299 | |
300 if (this == b.base) | |
301 { | |
302 if (poffset) | |
303 { | |
304 *poffset = b.offset; | |
305 if (j && bc.base.isInterfaceDeclaration()) | |
306 *poffset = OFFSET_RUNTIME; | |
307 } | |
308 return 1; | |
309 } | |
310 if (isBaseOf(b, poffset)) | |
311 { | |
312 if (j && poffset && bc.base.isInterfaceDeclaration()) | |
313 *poffset = OFFSET_RUNTIME; | |
314 return 1; | |
315 } | |
316 } | |
317 if (poffset) | |
318 *poffset = 0; | |
319 return 0; | |
296 } | 320 } |
297 | 321 |
298 string kind() | 322 string kind() |
299 { | 323 { |
300 assert(false); | 324 assert(false); |