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:
parent
372bb5f32f
commit
7434885d07
1 changed files with 14 additions and 7 deletions
|
@ -5714,9 +5714,12 @@ BfTypedValue BfExprEvaluator::MatchConstructor(BfAstNode* targetSrc, BfMethodBou
|
||||||
if (checkMethod->mIsStatic)
|
if (checkMethod->mIsStatic)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((!curTypeInst->IsTypeMemberIncluded(checkMethod->mDeclaringType, activeTypeDef, mModule)) ||
|
if (!mModule->IsInSpecializedSection())
|
||||||
(!curTypeInst->IsTypeMemberAccessible(checkMethod->mDeclaringType, activeTypeDef)))
|
{
|
||||||
continue;
|
if ((!curTypeInst->IsTypeMemberIncluded(checkMethod->mDeclaringType, activeTypeDef, mModule)) ||
|
||||||
|
(!curTypeInst->IsTypeMemberAccessible(checkMethod->mDeclaringType, activeTypeDef)))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
auto checkProt = checkMethod->mProtection;
|
auto checkProt = checkMethod->mProtection;
|
||||||
|
|
||||||
|
@ -12383,7 +12386,7 @@ BfModuleMethodInstance BfExprEvaluator::GetSelectedMethod(BfAstNode* targetSrc,
|
||||||
|
|
||||||
if (methodDef->IsEmptyPartial())
|
if (methodDef->IsEmptyPartial())
|
||||||
return methodInstance;
|
return methodInstance;
|
||||||
|
|
||||||
for (int checkGenericIdx = 0; checkGenericIdx < (int)methodMatcher.mBestMethodGenericArguments.size(); checkGenericIdx++)
|
for (int checkGenericIdx = 0; checkGenericIdx < (int)methodMatcher.mBestMethodGenericArguments.size(); checkGenericIdx++)
|
||||||
{
|
{
|
||||||
auto& genericParams = methodInstance.mMethodInstance->mMethodInfoEx->mGenericParams;
|
auto& genericParams = methodInstance.mMethodInstance->mMethodInfoEx->mGenericParams;
|
||||||
|
@ -12400,7 +12403,8 @@ BfModuleMethodInstance BfExprEvaluator::GetSelectedMethod(BfAstNode* targetSrc,
|
||||||
paramSrc = methodMatcher.mArguments[methodMatcher.mBestMethodGenericArgumentSrcs[checkGenericIdx]].mExpression;
|
paramSrc = methodMatcher.mArguments[methodMatcher.mBestMethodGenericArgumentSrcs[checkGenericIdx]].mExpression;
|
||||||
|
|
||||||
BfError* error = NULL;
|
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())
|
if (methodInstance.mMethodInstance->IsSpecializedGenericMethod())
|
||||||
{
|
{
|
||||||
|
@ -14057,8 +14061,11 @@ BfModuleMethodInstance BfExprEvaluator::GetPropertyMethodInstance(BfMethodDef* m
|
||||||
|
|
||||||
for (auto& iface : checkTypeInst->mInterfaces)
|
for (auto& iface : checkTypeInst->mInterfaces)
|
||||||
{
|
{
|
||||||
if (!checkTypeInst->IsTypeMemberAccessible(iface.mDeclaringType, activeTypeDef))
|
if (!mModule->IsInSpecializedSection())
|
||||||
continue;
|
{
|
||||||
|
if (!checkTypeInst->IsTypeMemberAccessible(iface.mDeclaringType, activeTypeDef))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (iface.mInterfaceType == mPropTarget.mType)
|
if (iface.mInterfaceType == mPropTarget.mType)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue