1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 14:24:10 +02:00

Fixed generics property and ctor visibility

This commit is contained in:
Brian Fiete 2020-05-16 08:21:20 -07:00
parent 372bb5f32f
commit 7434885d07

View file

@ -5714,9 +5714,12 @@ BfTypedValue BfExprEvaluator::MatchConstructor(BfAstNode* targetSrc, BfMethodBou
if (checkMethod->mIsStatic)
continue;
if (!mModule->IsInSpecializedSection())
{
if ((!curTypeInst->IsTypeMemberIncluded(checkMethod->mDeclaringType, activeTypeDef, mModule)) ||
(!curTypeInst->IsTypeMemberAccessible(checkMethod->mDeclaringType, activeTypeDef)))
continue;
}
auto checkProt = checkMethod->mProtection;
@ -12400,7 +12403,8 @@ BfModuleMethodInstance BfExprEvaluator::GetSelectedMethod(BfAstNode* targetSrc,
paramSrc = methodMatcher.mArguments[methodMatcher.mBestMethodGenericArgumentSrcs[checkGenericIdx]].mExpression;
BfError* error = NULL;
if ((!failed) && (!mModule->CheckGenericConstraints(BfGenericParamSource(methodInstance.mMethodInstance), genericArg, paramSrc, genericParams[checkGenericIdx], &methodMatcher.mBestMethodGenericArguments, &error)))
if (!mModule->CheckGenericConstraints(BfGenericParamSource(methodInstance.mMethodInstance), genericArg, paramSrc, genericParams[checkGenericIdx], &methodMatcher.mBestMethodGenericArguments,
failed ? NULL : &error))
{
if (methodInstance.mMethodInstance->IsSpecializedGenericMethod())
{
@ -14056,9 +14060,12 @@ BfModuleMethodInstance BfExprEvaluator::GetPropertyMethodInstance(BfMethodDef* m
mModule->PopulateType(checkTypeInst, BfPopulateType_DataAndMethods);
for (auto& iface : checkTypeInst->mInterfaces)
{
if (!mModule->IsInSpecializedSection())
{
if (!checkTypeInst->IsTypeMemberAccessible(iface.mDeclaringType, activeTypeDef))
continue;
}
if (iface.mInterfaceType == mPropTarget.mType)
{