mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 14:54:09 +02:00
Fixed function pointers with 'void* this'
This commit is contained in:
parent
7bc9b7af0a
commit
9d3e245f69
1 changed files with 2 additions and 2 deletions
|
@ -5027,7 +5027,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
|
||||||
{
|
{
|
||||||
if (mModule->mIsConstModule)
|
if (mModule->mIsConstModule)
|
||||||
{
|
{
|
||||||
funcCallInst = mModule->mBfIRBuilder->ConstEval_GetInterfaceFunc(irArgs[0], methodInstance->mMethodInstanceGroup->mOwner->mTypeId, methodInstance->mVirtualTableIdx, funcPtrType1);
|
funcCallInst = mModule->mBfIRBuilder->ConstEval_GetInterfaceFunc(irArgs[0], methodInstance->mMethodInstanceGroup->mOwner->mTypeId, methodInstance->mMethodDef->mIdx, funcPtrType1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -6518,7 +6518,7 @@ SplatArgs(lookupVal, irArgs);
|
||||||
{
|
{
|
||||||
auto underlyingType = wantType->GetUnderlyingType();
|
auto underlyingType = wantType->GetUnderlyingType();
|
||||||
mModule->PopulateType(underlyingType, BfPopulateType_Data);
|
mModule->PopulateType(underlyingType, BfPopulateType_Data);
|
||||||
if (underlyingType->IsValuelessType())
|
if ((underlyingType->IsValuelessType()) && (!underlyingType->IsVoid()))
|
||||||
{
|
{
|
||||||
// We don't actually pass a 'this' pointer for mut methods on valueless structs
|
// We don't actually pass a 'this' pointer for mut methods on valueless structs
|
||||||
argIdx++;
|
argIdx++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue