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

Commit 0bb7166

Browse files
committed
fix pattern in destructuring args
1 parent ceea87d commit 0bb7166

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cli/reactjs_jsx_ppx_v4.ml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -988,14 +988,8 @@ let transformComponentDefinition nestedModules mapper structure returnStructures
988988
((if isOptional arg_label then
989989
(* { name: @optional name } *)
990990
( {loc = ppat_loc; txt = Lident (getLabel arg_label)},
991-
Pat.constraint_
992-
(Pat.var {txt = getLabel arg_label; loc = ppat_loc})
993-
(Typ.constr ~attrs:optionalAttr
994-
{
995-
txt = Lident (getLabel arg_label);
996-
loc = Location.none;
997-
}
998-
[]) )
991+
Pat.var ~attrs:optionalAttr
992+
{txt = getLabel arg_label; loc = ppat_loc} )
999993
else
1000994
( {loc = ppat_loc; txt = Lident (getLabel arg_label)},
1001995
Pat.var {txt = getLabel arg_label; loc = ppat_loc} ))

0 commit comments

Comments
 (0)