Skip to content

Commit

Permalink
[fix] fixed getting type of heap ref
Browse files Browse the repository at this point in the history
  • Loading branch information
MchKosticyn committed Dec 12, 2023
1 parent 0beb1f4 commit 01df57c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions VSharp.SILI.Core/Memory.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> && sightType = typeof<char[]> || locationType = typeof<char[]> && sightType = typeof<string> then
typeof<string>
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 =
Expand Down

0 comments on commit 01df57c

Please sign in to comment.