Skip to content

Commit

Permalink
Merge pull request #396 from emillon/removed-string-set
Browse files Browse the repository at this point in the history
Handle Syntaxerr.Removed_string_set
  • Loading branch information
emillon authored Jul 19, 2022
2 parents e89802f + 8c20395 commit e2a765f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/uTop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ let parse_default parse str eos_is_error =
| Syntaxerr.Invalid_package_type (loc, s) ->
Error ([mkloc loc],
Printf.sprintf "Invalid package type: %s" s)
#endif
#if OCAML_VERSION >= (5, 0, 0)
| Syntaxerr.Removed_string_set loc ->
Error ([mkloc loc],
"Syntax error: strings are immutable, there is no assignment \
syntax for them.\n\
Hint: Mutable sequences of bytes are available in the Bytes module.\n\
Hint: Did you mean to use 'Bytes.set'?")
#endif
end
| Syntaxerr.Escape_error | Parsing.Parse_error ->
Expand Down

0 comments on commit e2a765f

Please sign in to comment.