Skip to content

Commit

Permalink
Fix is_rec_assign bug in simpleChecker.ml
Browse files Browse the repository at this point in the history
Change to return `false` in the case of unknown type variables
because such type variables will turn out to be `Int`.
(`false` is returned in the case of `Int`.)
  • Loading branch information
0npv527yh9 committed Nov 8, 2023
1 parent 2a6db50 commit c167a6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simpleChecker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ let is_rec_assign sub c t' =
Hashtbl.find_opt sub.resolv v
|> Option.map [%cast: typ]
|> Option.map @@ check_loop h_rec
|> Option.value ~default:true
|> Option.value ~default:false
| `Int -> false
| `TyCons c ->
let c_id = TyCons.unwrap c in
Expand Down

0 comments on commit c167a6f

Please sign in to comment.