From 355db634ca92884fe1ad9fde38e3cf255a63783c Mon Sep 17 00:00:00 2001 From: MchKosticyn Date: Thu, 31 Aug 2023 16:48:03 +0300 Subject: [PATCH] [fix] fixed casting combined term --- VSharp.SILI.Core/TypeCasting.fs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VSharp.SILI.Core/TypeCasting.fs b/VSharp.SILI.Core/TypeCasting.fs index 79bc48b79..d8e881026 100644 --- a/VSharp.SILI.Core/TypeCasting.fs +++ b/VSharp.SILI.Core/TypeCasting.fs @@ -214,6 +214,8 @@ module internal TypeCasting = // Ptr (HeapLocation addr) typ (makeNumber 0) | Struct(_ , t), _ when t = targetType -> term | Struct _, _ -> internalfailf $"Casting struct to {targetType}" + | Combined(slices, t), _ when isPointer t && isPointer targetType -> + combine slices targetType | _ -> internalfailf $"Can't cast {term} to type {targetType}" let canCast state term targetType =