Skip to content

Commit 938aa5e

Browse files
committed
Fix parenthesing of let in class expressions
1 parent 35ef398 commit 938aa5e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/Ast.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,6 +1777,7 @@ end = struct
17771777
match c.pcl_desc with
17781778
| Pcl_apply _ -> Some Apply
17791779
| Pcl_structure _ -> Some Apply
1780+
| Pcl_let _ -> Some Low
17801781
| _ -> None )
17811782
| Top | Pat _ | Mty _ | Mod _ | Sig _ | Str _ | Tli _ | Clf _ | Ctf _
17821783
|Rep | Mb _ | Md _ | Cd _ | Ctd _ ->

test/passing/tests/class_expr.ml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@ class c =
1515
let pci_params = self#list in
1616
()
1717
end
18+
19+
class c =
20+
(let () = print_endline "Class init" in
21+
with_param)
22+
()

0 commit comments

Comments
 (0)