Forráskód Böngészése

Fixed function pointers with 'void* this'

Brian Fiete 4 éve
szülő
commit
9d3e245f69
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 2 - 2
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -5027,7 +5027,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
 			{
 				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
 				{
@@ -6518,7 +6518,7 @@ SplatArgs(lookupVal, irArgs);
 			{
 				auto underlyingType = wantType->GetUnderlyingType();
 				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
 					argIdx++;