浏览代码

Aggregate fix for nullable casting

Brian Fiete 6 月之前
父节点
当前提交
65a3bb2196
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      IDEHelper/Compiler/BfModuleTypeUtils.cpp

+ 1 - 0
IDEHelper/Compiler/BfModuleTypeUtils.cpp

@@ -14087,6 +14087,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
 		if (!typedVal.IsAddr())
 		{
 			auto srcAlloca = CreateAllocaInst(fromNullableType);
+			typedVal = LoadOrAggregateValue(typedVal);
 			mBfIRBuilder->CreateStore(typedVal.mValue, srcAlloca);
 			srcPtr = srcAlloca;
 		}