| 15453 | } |
| 15454 | |
| 15455 | BfTypeDef* BfModule::FindCommonOuterType(BfTypeDef* type, BfTypeDef* type2) |
| 15456 | { |
| 15457 | if ((type == NULL) || (type2 == NULL)) |
| 15458 | return NULL; |
| 15459 | int curNestDepth = BF_MIN(type->mNestDepth, type2->mNestDepth); |
| 15460 | while (type->mNestDepth > curNestDepth) |
| 15461 | type = type->mOuterType; |
| 15462 | while (type2->mNestDepth > curNestDepth) |
| 15463 | type2 = type2->mOuterType; |
| 15464 | |
| 15465 | while (curNestDepth >= 0) |
| 15466 | { |
| 15467 | if ((!type->mIsPartial) && (!type2->mIsPartial)) |
| 15468 | { |
| 15469 | if (type->GetDefinition() == type2->GetDefinition()) |
| 15470 | return type; |
| 15471 | } |
| 15472 | else |
| 15473 | { |
| 15474 | if (type->mFullNameEx == type2->mFullNameEx) |
| 15475 | return type; |
| 15476 | } |
| 15477 | type = type->mOuterType; |
| 15478 | type2 = type2->mOuterType; |
| 15479 | curNestDepth--; |
| 15480 | } |
| 15481 | |
| 15482 | return NULL; |
| 15483 | } |
| 15484 | |
| 15485 | bool BfModule::TypeIsSubTypeOf(BfTypeInstance* srcType, BfTypeInstance* wantType, bool checkAccessibility) |
| 15486 | { |
no test coverage detected