Skip to content

Commit f023ced

Browse files
committed
Trivial is simple
1 parent 6d14522 commit f023ced

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
@@ -1486,7 +1486,7 @@ end = struct
14861486
| Pexp_constant {pconst_desc= Pconst_string (_, _, Some _); _} -> false
14871487
(* Only strings fitting on the line are simple. *)
14881488
| Pexp_constant {pconst_desc= Pconst_string (_, loc, None); _} ->
1489-
Location.height loc = 1 && fit_margin c (width xexp)
1489+
Exp.is_trivial exp || (Location.height loc = 1 && fit_margin c (width xexp))
14901490
| Pexp_constant _ -> true
14911491
| Pexp_field _ | Pexp_ident _ | Pexp_send _
14921492
|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)