Skip to content

Commit 93d5049

Browse files
Julowgpetiot
authored andcommitted
Trivial is simple
1 parent feafdf9 commit 93d5049

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/Ast.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ end = struct
15301530
| Pexp_constant {pconst_desc= Pconst_string (_, _, Some _); _} -> false
15311531
(* Only strings fitting on the line are simple. *)
15321532
| Pexp_constant {pconst_desc= Pconst_string (_, loc, None); _} ->
1533-
Location.height loc = 1 && fit_margin c (width xexp)
1533+
Exp.is_trivial exp || (Location.height loc = 1 && fit_margin c (width xexp))
15341534
| Pexp_constant _ -> true
15351535
| Pexp_field _ | Pexp_ident _ | Pexp_send _
15361536
|Pexp_construct (_, None)

test/passing/tests/js_args.ml.ref

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ let () =
3333
messages :=
3434
Message_store.create (Session_id.of_string "")
3535
(* Tuareg indents these lines too far to the left. *)
36-
"herd-retransmitter"
37-
Message_store.Message_size.Byte
36+
"herd-retransmitter" Message_store.Message_size.Byte
3837

3938
let () =
4039
raise

0 commit comments

Comments
 (0)