Skip to content

Commit

Permalink
[Parser] Fix typing for nil
Browse files Browse the repository at this point in the history
  • Loading branch information
TDacik committed Feb 20, 2025
1 parent 0613561 commit c53d62d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/parser/Parser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,13 @@ and parse_pointer_aux ctx source target source_loc target_loc =
~actual:(Sort.show @@ SL.Term.get_sort source)
~expected:"a location sort"
in
if Sort.equal expected_sort (SL.Term.get_sort target) then
let target_sort = SL.Term.get_sort target in
if Sort.equal expected_sort target_sort || Sort.is_nil target_sort then
SL.mk_pto source target
else ParserException.raise_sort_error
(Some target_loc)
~name:"pointer target"
~actual:(Sort.show @@ SL.Term.get_sort source)
~actual:(Sort.show @@ SL.Term.get_sort target)
~expected:(Sort.show expected_sort)

and parse_pointer ctx [source_t; target_t] =
Expand Down

0 comments on commit c53d62d

Please sign in to comment.