Skip to content

Commit

Permalink
[fix] fixed casting combined term
Browse files Browse the repository at this point in the history
  • Loading branch information
MchKosticyn committed Aug 31, 2023
1 parent 902ec01 commit 355db63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions VSharp.SILI.Core/TypeCasting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 355db63

Please sign in to comment.