Skip to content

Commit bc2eeeb

Browse files
committed
snapshot
1 parent 645e9e0 commit bc2eeeb

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49698,6 +49698,8 @@ let funExpr expr =
4969849698
} ->
4969949699
let parameter = Parameter {attrs = []; lbl; defaultExpr; pat = pattern} in
4970049700
collect attrsBefore (parameter :: acc) returnExpr
49701+
(* If a fun has an attribute, then it stops here and makes currying.
49702+
i.e attributes outside of (...), uncurried `(.)` and `async` make currying *)
4970149703
| {pexp_desc = Pexp_fun _} -> (attrsBefore, List.rev acc, expr)
4970249704
| expr -> (attrsBefore, List.rev acc, expr)
4970349705
in

lib/4.06.1/unstable/js_playground_compiler.ml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49698,6 +49698,8 @@ let funExpr expr =
4969849698
} ->
4969949699
let parameter = Parameter {attrs = []; lbl; defaultExpr; pat = pattern} in
4970049700
collect attrsBefore (parameter :: acc) returnExpr
49701+
(* If a fun has an attribute, then it stops here and makes currying.
49702+
i.e attributes outside of (...), uncurried `(.)` and `async` make currying *)
4970149703
| {pexp_desc = Pexp_fun _} -> (attrsBefore, List.rev acc, expr)
4970249704
| expr -> (attrsBefore, List.rev acc, expr)
4970349705
in
@@ -284814,7 +284816,7 @@ and parseParameter p =
284814284816
Ast_helper.Pat.constraint_ ~attrs:(propLocAttr :: attrs) ~loc pat
284815284817
typ
284816284818
in
284817-
(attrs, Asttypes.Labelled lblName, pat)
284819+
([], Asttypes.Labelled lblName, pat)
284818284820
| As ->
284819284821
Parser.next p;
284820284822
let pat =
@@ -284830,7 +284832,8 @@ and parseParameter p =
284830284832
let loc = mkLoc startPos p.prevEndPos in
284831284833
( [],
284832284834
Asttypes.Labelled lblName,
284833-
Ast_helper.Pat.var ~loc (Location.mkloc lblName loc) ))
284835+
Ast_helper.Pat.var ~attrs:(propLocAttr :: attrs) ~loc
284836+
(Location.mkloc lblName loc) ))
284834284837
| _ ->
284835284838
let pattern = parseConstrainedPattern p in
284836284839
let attrs = List.concat [pattern.ppat_attributes; attrs] in

lib/4.06.1/whole_compiler.ml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225560,6 +225560,8 @@ let funExpr expr =
225560225560
} ->
225561225561
let parameter = Parameter {attrs = []; lbl; defaultExpr; pat = pattern} in
225562225562
collect attrsBefore (parameter :: acc) returnExpr
225563+
(* If a fun has an attribute, then it stops here and makes currying.
225564+
i.e attributes outside of (...), uncurried `(.)` and `async` make currying *)
225563225565
| {pexp_desc = Pexp_fun _} -> (attrsBefore, List.rev acc, expr)
225564225566
| expr -> (attrsBefore, List.rev acc, expr)
225565225567
in
@@ -298246,7 +298248,7 @@ and parseParameter p =
298246298248
Ast_helper.Pat.constraint_ ~attrs:(propLocAttr :: attrs) ~loc pat
298247298249
typ
298248298250
in
298249-
(attrs, Asttypes.Labelled lblName, pat)
298251+
([], Asttypes.Labelled lblName, pat)
298250298252
| As ->
298251298253
Parser.next p;
298252298254
let pat =
@@ -298262,7 +298264,8 @@ and parseParameter p =
298262298264
let loc = mkLoc startPos p.prevEndPos in
298263298265
( [],
298264298266
Asttypes.Labelled lblName,
298265-
Ast_helper.Pat.var ~loc (Location.mkloc lblName loc) ))
298267+
Ast_helper.Pat.var ~attrs:(propLocAttr :: attrs) ~loc
298268+
(Location.mkloc lblName loc) ))
298266298269
| _ ->
298267298270
let pattern = parseConstrainedPattern p in
298268298271
let attrs = List.concat [pattern.ppat_attributes; attrs] in

0 commit comments

Comments
 (0)