From 01df57cea3e691e26d626db3ff04b1add2351d50 Mon Sep 17 00:00:00 2001 From: MchKosticyn Date: Mon, 11 Dec 2023 00:41:42 +0300 Subject: [PATCH] [fix] fixed getting type of heap ref --- VSharp.SILI.Core/Memory.fs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/VSharp.SILI.Core/Memory.fs b/VSharp.SILI.Core/Memory.fs index 55f054399..b05493cb1 100644 --- a/VSharp.SILI.Core/Memory.fs +++ b/VSharp.SILI.Core/Memory.fs @@ -192,8 +192,13 @@ module internal Memory = if isAssignable locationType sightType then locationType else if isAssignable sightType locationType |> not then - Logger.trace $"mostConcreteTypeOfHeapRef: Sight type ({sightType}) of address {address} differs from type in heap ({locationType})" - sightType + if locationType = typeof && sightType = typeof || locationType = typeof && sightType = typeof then + typeof + else + Logger.trace $"mostConcreteTypeOfHeapRef: Sight type ({sightType}) of address {address} differs from type in heap ({locationType})" + sightType + else + sightType let mostConcreteTypeOfRef state ref = let getType ref =