File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,9 @@ profile. This started with version 0.26.0.
52
52
- Fix comments around underscore in record patterns (#2540 , @Julow )
53
53
- Fix dropped comments before ` begin .. end ` in a match case (#2541 , @Julow )
54
54
- Fix closing ` *) ` in doc-comments exceeding the margin (#2550 , @Julow )
55
- - Fix invalid syntax geneated for begin..end attributes (#2551 , @Julow )
55
+ - Fix invalid syntax generated for begin..end attributes (#2551 , @Julow )
56
56
The attribute is moved from ` begin .. end [@attr] ` to ` begin [@attr] .. end ` .
57
+ - Fix missing parentheses around ` let .. in [@attr] ` (#2564 , @Julow )
57
58
- Display ` a##b ` instead of ` a ## b ` and similarly for operators that start with # (#2580 , @v-gb )
58
59
59
60
### Changes
Original file line number Diff line number Diff line change @@ -4476,7 +4476,6 @@ and fmt_structure_item c ~last:last_item ~semisemi {ctx= parent_ctx; ast= si}
4476
4476
4477
4477
and fmt_let c ~rec_flag ~bindings ~parens ~fmt_atrs ~fmt_expr ~loc_in
4478
4478
~body_loc ~has_attr ~indent_after_in =
4479
- let parens = parens || has_attr in
4480
4479
let fmt_in indent =
4481
4480
match c.conf.fmt_opts.break_before_in.v with
4482
4481
| `Fit_or_vertical -> break 1 (- indent) $ str " in"
@@ -4495,13 +4494,14 @@ and fmt_let c ~rec_flag ~bindings ~parens ~fmt_atrs ~fmt_expr ~loc_in
4495
4494
| `Compact -> space_break )
4496
4495
in
4497
4496
let blank_line_after_in = sequence_blank_line c loc_in body_loc in
4498
- Params.Exp. wrap c.conf ~parens: (parens || has_attr) ~fits_breaks: false
4499
- (vbox 0
4500
- ( hvbox 0 (list_fl bindings fmt_binding)
4501
- $ ( if blank_line_after_in then str " \n " $ cut_break
4502
- else break 1000 indent_after_in )
4503
- $ hvbox 0 fmt_expr ) )
4504
- $ fmt_atrs
4497
+ Params.Exp. wrap c.conf ~parens ~fits_breaks: false
4498
+ ( Params.Exp. wrap c.conf ~parens: has_attr ~fits_breaks: false
4499
+ (vbox 0
4500
+ ( hvbox 0 (list_fl bindings fmt_binding)
4501
+ $ ( if blank_line_after_in then str " \n " $ cut_break
4502
+ else break 1000 indent_after_in )
4503
+ $ hvbox 0 fmt_expr ) )
4504
+ $ fmt_atrs )
4505
4505
4506
4506
and fmt_value_constraint c vc_opt =
4507
4507
let fmt_sep x =
Original file line number Diff line number Diff line change @@ -10,3 +10,9 @@ let () =
10
10
let _ = lazy (a.b < - 1 )
11
11
12
12
let _ = match x with (lazy (Some _ as x )), x -> x
13
+
14
+ let _ =
15
+ lazy
16
+ ((let () = () in
17
+ () )
18
+ [@ attr] )
You can’t perform that action at this time.
0 commit comments