فهرست منبع

Fixed cast check issue

Brian Fiete 4 سال پیش
والد
کامیت
9a4aeb7ec7
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      IDEHelper/Compiler/BfModuleTypeUtils.cpp

+ 1 - 0
IDEHelper/Compiler/BfModuleTypeUtils.cpp

@@ -9955,6 +9955,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
 
 
 			if (genericParamInst->mTypeConstraint != NULL)
 			if (genericParamInst->mTypeConstraint != NULL)
 			{
 			{
+				SetAndRestoreValue<bool> prevIgnoreWrites(mBfIRBuilder->mIgnoreWrites, true);
 				auto constraintTypeInst = genericParamInst->mTypeConstraint->ToTypeInstance();
 				auto constraintTypeInst = genericParamInst->mTypeConstraint->ToTypeInstance();
 				if ((constraintTypeInst != NULL) && (constraintTypeInst->mTypeDef == mCompiler->mEnumTypeDef))
 				if ((constraintTypeInst != NULL) && (constraintTypeInst->mTypeDef == mCompiler->mEnumTypeDef))
 				{
 				{