Skip to content

Commit 61c0f13

Browse files
authored
Merge pull request #2784 from BuckleScript/gpr_2781
fix #2781
2 parents 412f87a + 367ed49 commit 61c0f13

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

jscomp/syntax/ast_derive_abstract.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ let handleTdcl (tdcl : Parsetree.type_declaration) =
8585
if is_optional then
8686
let optional_type = Ast_core_type.lift_option_type pld_type in
8787
(Ast_core_type.opt_arrow pld_loc label_name optional_type maker,
88-
Val.mk pld_name
88+
Val.mk ~loc:pld_loc pld_name
8989
~attrs:get_optional_attrs ~prim
9090
(Typ.arrow ~loc "" core_type optional_type)
9191
)
9292
else
9393
Typ.arrow ~loc:pld_loc label_name pld_type maker,
94-
Val.mk pld_name ~attrs:get_attrs
94+
Val.mk ~loc:pld_loc pld_name ~attrs:get_attrs
9595
~prim:(
9696
["" ; (* Not needed actually*)
9797
External_ffi_types.to_string
@@ -112,7 +112,7 @@ let handleTdcl (tdcl : Parsetree.type_declaration) =
112112
(Typ.arrow ""
113113
pld_type (* setter *)
114114
(Ast_literal.type_unit ()))) in
115-
Val.mk
115+
Val.mk ~loc:pld_loc
116116
{loc = label_loc; txt = label_name ^ "Set"}
117117
(* setter *)
118118
~attrs:set_attrs

lib/bsdep.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36872,13 +36872,13 @@ let handleTdcl (tdcl : Parsetree.type_declaration) =
3687236872
if is_optional then
3687336873
let optional_type = Ast_core_type.lift_option_type pld_type in
3687436874
(Ast_core_type.opt_arrow pld_loc label_name optional_type maker,
36875-
Val.mk pld_name
36875+
Val.mk ~loc:pld_loc pld_name
3687636876
~attrs:get_optional_attrs ~prim
3687736877
(Typ.arrow ~loc "" core_type optional_type)
3687836878
)
3687936879
else
3688036880
Typ.arrow ~loc:pld_loc label_name pld_type maker,
36881-
Val.mk pld_name ~attrs:get_attrs
36881+
Val.mk ~loc:pld_loc pld_name ~attrs:get_attrs
3688236882
~prim:(
3688336883
["" ; (* Not needed actually*)
3688436884
External_ffi_types.to_string
@@ -36899,7 +36899,7 @@ let handleTdcl (tdcl : Parsetree.type_declaration) =
3689936899
(Typ.arrow ""
3690036900
pld_type (* setter *)
3690136901
(Ast_literal.type_unit ()))) in
36902-
Val.mk
36902+
Val.mk ~loc:pld_loc
3690336903
{loc = label_loc; txt = label_name ^ "Set"}
3690436904
(* setter *)
3690536905
~attrs:set_attrs

lib/bsppx.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18877,13 +18877,13 @@ let handleTdcl (tdcl : Parsetree.type_declaration) =
1887718877
if is_optional then
1887818878
let optional_type = Ast_core_type.lift_option_type pld_type in
1887918879
(Ast_core_type.opt_arrow pld_loc label_name optional_type maker,
18880-
Val.mk pld_name
18880+
Val.mk ~loc:pld_loc pld_name
1888118881
~attrs:get_optional_attrs ~prim
1888218882
(Typ.arrow ~loc "" core_type optional_type)
1888318883
)
1888418884
else
1888518885
Typ.arrow ~loc:pld_loc label_name pld_type maker,
18886-
Val.mk pld_name ~attrs:get_attrs
18886+
Val.mk ~loc:pld_loc pld_name ~attrs:get_attrs
1888718887
~prim:(
1888818888
["" ; (* Not needed actually*)
1888918889
External_ffi_types.to_string
@@ -18904,7 +18904,7 @@ let handleTdcl (tdcl : Parsetree.type_declaration) =
1890418904
(Typ.arrow ""
1890518905
pld_type (* setter *)
1890618906
(Ast_literal.type_unit ()))) in
18907-
Val.mk
18907+
Val.mk ~loc:pld_loc
1890818908
{loc = label_loc; txt = label_name ^ "Set"}
1890918909
(* setter *)
1891018910
~attrs:set_attrs

lib/js/belt_Debug.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,12 @@ var formatter = {
123123
}
124124

125125
}
126-
126+
if (typeof window === "undefined"){
127127
global.devtoolsFormatters = [formatter]
128+
}
129+
else {
130+
window.devtoolsFormatters = [formatter]
131+
}
128132
return 0
129133

130134
};

lib/whole_compiler.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111243,13 +111243,13 @@ let handleTdcl (tdcl : Parsetree.type_declaration) =
111243111243
if is_optional then
111244111244
let optional_type = Ast_core_type.lift_option_type pld_type in
111245111245
(Ast_core_type.opt_arrow pld_loc label_name optional_type maker,
111246-
Val.mk pld_name
111246+
Val.mk ~loc:pld_loc pld_name
111247111247
~attrs:get_optional_attrs ~prim
111248111248
(Typ.arrow ~loc "" core_type optional_type)
111249111249
)
111250111250
else
111251111251
Typ.arrow ~loc:pld_loc label_name pld_type maker,
111252-
Val.mk pld_name ~attrs:get_attrs
111252+
Val.mk ~loc:pld_loc pld_name ~attrs:get_attrs
111253111253
~prim:(
111254111254
["" ; (* Not needed actually*)
111255111255
External_ffi_types.to_string
@@ -111270,7 +111270,7 @@ let handleTdcl (tdcl : Parsetree.type_declaration) =
111270111270
(Typ.arrow ""
111271111271
pld_type (* setter *)
111272111272
(Ast_literal.type_unit ()))) in
111273-
Val.mk
111273+
Val.mk ~loc:pld_loc
111274111274
{loc = label_loc; txt = label_name ^ "Set"}
111275111275
(* setter *)
111276111276
~attrs:set_attrs

0 commit comments

Comments
 (0)