mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 06:44: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 (!mModule->IsInSpecializedSection())
|
||||||
|
{
|
||||||
if ((!curTypeInst->IsTypeMemberIncluded(checkMethod->mDeclaringType, activeTypeDef, mModule)) ||
|
if ((!curTypeInst->IsTypeMemberIncluded(checkMethod->mDeclaringType, activeTypeDef, mModule)) ||
|
||||||
(!curTypeInst->IsTypeMemberAccessible(checkMethod->mDeclaringType, activeTypeDef)))
|
(!curTypeInst->IsTypeMemberAccessible(checkMethod->mDeclaringType, activeTypeDef)))
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
auto checkProt = checkMethod->mProtection;
|
auto checkProt = checkMethod->mProtection;
|
||||||
|
|
||||||
|
@ -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())
|
||||||
{
|
{
|
||||||
|
@ -14056,9 +14060,12 @@ BfModuleMethodInstance BfExprEvaluator::GetPropertyMethodInstance(BfMethodDef* m
|
||||||
mModule->PopulateType(checkTypeInst, BfPopulateType_DataAndMethods);
|
mModule->PopulateType(checkTypeInst, BfPopulateType_DataAndMethods);
|
||||||
|
|
||||||
for (auto& iface : checkTypeInst->mInterfaces)
|
for (auto& iface : checkTypeInst->mInterfaces)
|
||||||
|
{
|
||||||
|
if (!mModule->IsInSpecializedSection())
|
||||||
{
|
{
|
||||||
if (!checkTypeInst->IsTypeMemberAccessible(iface.mDeclaringType, activeTypeDef))
|
if (!checkTypeInst->IsTypeMemberAccessible(iface.mDeclaringType, activeTypeDef))
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (iface.mInterfaceType == mPropTarget.mType)
|
if (iface.mInterfaceType == mPropTarget.mType)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue