| 3687 | } |
| 3688 | |
| 3689 | bool BfModule::CheckAccessMemberProtection(BfProtection protection, BfTypeInstance* memberType) |
| 3690 | { |
| 3691 | bool allowPrivate = (memberType == mCurTypeInstance) || (IsInnerType(mCurTypeInstance, memberType)); |
| 3692 | if (!allowPrivate) |
| 3693 | allowPrivate |= memberType->IsInterface(); |
| 3694 | bool allowProtected = allowPrivate; |
| 3695 | //TODO: We had this commented out, but this makes accessing protected properties fail |
| 3696 | if (mCurTypeInstance != NULL) |
| 3697 | allowProtected |= TypeIsSubTypeOf(mCurTypeInstance, memberType->ToTypeInstance()); |
| 3698 | if (!CheckProtection(protection, memberType->mTypeDef, allowProtected, allowPrivate)) |
| 3699 | { |
| 3700 | return false; |
| 3701 | } |
| 3702 | return true; |
| 3703 | } |
| 3704 | |
| 3705 | bool BfModule::CheckDefineMemberProtection(BfProtection protection, BfType* memberType) |
| 3706 | { |
no test coverage detected