Skip to content

Commit

Permalink
Fix printing of modes in return types
Browse files Browse the repository at this point in the history
  • Loading branch information
stedolan committed Dec 7, 2021
1 parent 91f2281 commit ce34678
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions testsuite/tests/typing-local/local.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1804,10 +1804,9 @@ end
Line 6, characters 46-47:
6 | let z : (int list -> unit) -> int -> unit = f
^
Error: This expression has type
(local_ int list -> local_ unit) -> int -> unit
Error: This expression has type (local_ int list -> unit) -> int -> unit
but an expression was expected of type
(int list -> unit) -> int -> unit
Type local_ int list -> local_ unit is not compatible with type
Type local_ int list -> unit is not compatible with type
int list -> unit
|}]
2 changes: 1 addition & 1 deletion typing/oprint.ml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ and print_out_ret mode rm ppf ty =
| Oam_local, Oam_local
| Oam_global, Oam_global
| Oam_unknown, _
| _, Oam_unknown -> print_out_type_1 mode ppf ty
| _, Oam_unknown -> print_out_type_1 rm ppf ty
| _, Oam_local ->
pp_print_string ppf "local_";
pp_print_space ppf ();
Expand Down

0 comments on commit ce34678

Please sign in to comment.