Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 02498a4

Browse files
fix: ignore * (#477)
1 parent 163a02c commit 02498a4

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/res_printer.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ and printModType modType cmtTbl =
787787
{lbl.Asttypes.loc with loc_end = modType.Parsetree.pmty_loc.loc_end}
788788
in
789789
let attrs = printAttributes attrs cmtTbl in
790-
let lblDoc = if lbl.Location.txt = "_" then Doc.nil
790+
let lblDoc = if lbl.Location.txt = "_" || lbl.txt = "*" then Doc.nil
791791
else
792792
let doc = Doc.text lbl.txt in
793793
printComments doc cmtTbl lbl.loc

tests/printer/modType/expected/functor.res.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ module type Functor = (@attr1 SetLike, @attr2 BtreeLike) => @attr3 NeoTree
1212

1313
module type Functor = (SetLike => Set) with type t = A.t
1414
module type Functor = SetLike => (Set with type t = A.t)
15+
16+
module type B = () =>
17+
{
18+
19+
}

tests/printer/modType/functor.res

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ module type Functor = @attr1 (SetLike) => @attr2 (BtreeLike) => @attr3 NeoTree
1313

1414
module type Functor = SetLike => Set with type t = A.t
1515
module type Functor = SetLike => (Set with type t = A.t)
16+
17+
module type B = () => {
18+
19+
}

0 commit comments

Comments
 (0)