From b3b2009714a000a3e6feca18fb82af9477e8c09d Mon Sep 17 00:00:00 2001 From: a-c-sreedhar-reddy Date: Fri, 21 Jan 2022 23:08:09 +0530 Subject: [PATCH] fix: ignore * --- src/res_printer.ml | 2 +- tests/printer/modType/expected/functor.res.txt | 5 +++++ tests/printer/modType/functor.res | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/res_printer.ml b/src/res_printer.ml index 42d2de77..93559779 100644 --- a/src/res_printer.ml +++ b/src/res_printer.ml @@ -781,7 +781,7 @@ and printModType modType cmtTbl = {lbl.Asttypes.loc with loc_end = modType.Parsetree.pmty_loc.loc_end} in let attrs = printAttributes attrs cmtTbl in - let lblDoc = if lbl.Location.txt = "_" then Doc.nil + let lblDoc = if lbl.Location.txt = "_" || lbl.txt = "*" then Doc.nil else let doc = Doc.text lbl.txt in printComments doc cmtTbl lbl.loc diff --git a/tests/printer/modType/expected/functor.res.txt b/tests/printer/modType/expected/functor.res.txt index 66dccb8e..311a32c4 100644 --- a/tests/printer/modType/expected/functor.res.txt +++ b/tests/printer/modType/expected/functor.res.txt @@ -12,3 +12,8 @@ module type Functor = (@attr1 SetLike, @attr2 BtreeLike) => @attr3 NeoTree module type Functor = (SetLike => Set) with type t = A.t module type Functor = SetLike => (Set with type t = A.t) + +module type B = () => +{ + +} diff --git a/tests/printer/modType/functor.res b/tests/printer/modType/functor.res index 97bd389c..9149ed58 100644 --- a/tests/printer/modType/functor.res +++ b/tests/printer/modType/functor.res @@ -13,3 +13,7 @@ module type Functor = @attr1 (SetLike) => @attr2 (BtreeLike) => @attr3 NeoTree module type Functor = SetLike => Set with type t = A.t module type Functor = SetLike => (Set with type t = A.t) + +module type B = () => { + +} \ No newline at end of file