From c52ef256a541ab380aa7ab06e2b0a1148176633e Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 23 Nov 2021 17:32:22 -0800 Subject: [PATCH] Fixed undef type issue in ceMachine --- IDEHelper/Compiler/CeMachine.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/CeMachine.cpp b/IDEHelper/Compiler/CeMachine.cpp index a17417a8..a02f8971 100644 --- a/IDEHelper/Compiler/CeMachine.cpp +++ b/IDEHelper/Compiler/CeMachine.cpp @@ -4011,7 +4011,14 @@ BfTypedValue CeContext::Call(BfAstNode* targetSrc, BfModule* module, BfMethodIns { auto constant = module->mBfIRBuilder->GetConstant(arg); if (constant->mConstType == BfConstType_Undef) - isConst = false; + { + if (paramType->IsInstanceOf(module->mCompiler->mTypeTypeDef)) + { + args[argIdx] = module->CreateTypeDataRef(module->GetPrimitiveType(BfTypeCode_None)); + } + else + isConst = false; + } } if (!isConst)