mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Properly check for IsMemberAccessible for operators
This commit is contained in:
parent
fe4027d33a
commit
1dc1ec24a0
1 changed files with 5 additions and 3 deletions
|
@ -213,11 +213,13 @@ bool BfMethodMatcher::IsMemberAccessible(BfTypeInstance* typeInst, BfTypeDef* de
|
||||||
if (mActiveTypeDef == NULL)
|
if (mActiveTypeDef == NULL)
|
||||||
mActiveTypeDef = mModule->GetActiveTypeDef();
|
mActiveTypeDef = mModule->GetActiveTypeDef();
|
||||||
|
|
||||||
|
// This needs to be outside the `IsInSpecializedSection`. Note that mActiveTypeDef does not pose a constraint here
|
||||||
|
if (!typeInst->IsTypeMemberIncluded(declaringType, mActiveTypeDef, mModule))
|
||||||
|
return false;
|
||||||
|
|
||||||
// This may not be completely correct - BUT if we don't have this then even Dictionary TKey's operator == won't be considered accessible
|
// This may not be completely correct - BUT if we don't have this then even Dictionary TKey's operator == won't be considered accessible
|
||||||
if ((!mModule->IsInSpecializedSection()) && (mActiveTypeDef->mTypeDeclaration != NULL))
|
if ((!mModule->IsInSpecializedSection()) && (mActiveTypeDef->mTypeDeclaration != NULL))
|
||||||
{
|
{
|
||||||
if (!typeInst->IsTypeMemberIncluded(declaringType, mActiveTypeDef, mModule))
|
|
||||||
return false;
|
|
||||||
if (!typeInst->IsTypeMemberAccessible(declaringType, mActiveTypeDef))
|
if (!typeInst->IsTypeMemberAccessible(declaringType, mActiveTypeDef))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue