mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Fixed reifying of base virtual methods
This commit is contained in:
parent
36b6d63dbb
commit
d42cbbb6a9
2 changed files with 7 additions and 5 deletions
|
@ -4346,7 +4346,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfMethodInstance* methodInstance, BfIRV
|
||||||
auto typeInstance = methodInstance->GetOwner();
|
auto typeInstance = methodInstance->GetOwner();
|
||||||
auto& vEntry = typeInstance->mVirtualMethodTable[methodInstance->mVirtualTableIdx];
|
auto& vEntry = typeInstance->mVirtualMethodTable[methodInstance->mVirtualTableIdx];
|
||||||
BfMethodInstance* declaringMethodInstance = vEntry.mDeclaringMethod;
|
BfMethodInstance* declaringMethodInstance = vEntry.mDeclaringMethod;
|
||||||
if ((declaringMethodInstance->mMethodInstanceGroup->mOnDemandKind < BfMethodOnDemandKind_InWorkList) || (!methodInstance->mIsReified))
|
if ((declaringMethodInstance->mMethodInstanceGroup->mOnDemandKind < BfMethodOnDemandKind_InWorkList) || (!declaringMethodInstance->mIsReified))
|
||||||
mModule->GetMethodInstance(declaringMethodInstance);
|
mModule->GetMethodInstance(declaringMethodInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7136,6 +7136,7 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
|
||||||
|
|
||||||
prevBindResult.Restore();
|
prevBindResult.Restore();
|
||||||
|
|
||||||
|
// Check mut
|
||||||
if ((callTarget.mType != NULL) &&
|
if ((callTarget.mType != NULL) &&
|
||||||
(callTarget.mType->IsGenericParam()) &&
|
(callTarget.mType->IsGenericParam()) &&
|
||||||
((!callTarget.IsAddr()) || (callTarget.IsReadOnly())) &&
|
((!callTarget.IsAddr()) || (callTarget.IsReadOnly())) &&
|
||||||
|
@ -7161,6 +7162,7 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check mut on interface
|
||||||
if ((callTarget.mType != NULL) &&
|
if ((callTarget.mType != NULL) &&
|
||||||
(callTarget.mType->IsInterface()) &&
|
(callTarget.mType->IsInterface()) &&
|
||||||
(target.IsThis()) &&
|
(target.IsThis()) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue