File tree Expand file tree Collapse file tree 8 files changed +29
-21
lines changed
build_tests/super_errors/expected Expand file tree Collapse file tree 8 files changed +29
-21
lines changed Original file line number Diff line number Diff line change 11
22 [1;31mWe've found a bug for you![0m
3- [36m/.../fixtures/method_arity_mismatch.re[0m [2m3:8-9 [0m
3+ [36m/.../fixtures/method_arity_mismatch.re[0m [2m3:5-11 [0m
44
55 1 [2m│[0m let f = ( obj ) => {
66 2 [2m│[0m obj##hi (1,2);
7- [1;31m3[0m [2m│[0m obj [1;31m##[0mhi (1)
7+ [1;31m3[0m [2m│[0m [1;31mobj##hi[0m (1)
88 4 [2m│[0m }
99
1010 This method has arity2 but was expected arity1
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ let check_and_discard (args : Ast_compatible.args) =
5151
5252type app_pattern = {
5353 op : string ;
54- loc : Location .t ;
54+ loc : Location .t ; (* locatoin is the location of whole expression #4451 *)
5555 args : Parsetree .expression list
5656}
5757
@@ -62,10 +62,10 @@ let sane_property_name_check loc s =
6262(* match fn as *)
6363let view_as_app (fn : exp ) s : app_pattern option =
6464 match fn.pexp_desc with
65- | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; loc }}, args )
65+ | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; _ }}, args )
6666 when Ext_list. has_string s op
6767 ->
68- Some {op; loc; args = check_and_discard args}
68+ Some {op; loc = fn.pexp_loc ; args = check_and_discard args}
6969 | _ -> None
7070
7171
Original file line number Diff line number Diff line change @@ -10955,9 +10955,13 @@ let clean_re_js root =
1095510955 | None -> Set_string.empty
1095610956 in
1095710957 let gentype_language =
10958- match Map_string.find_opt map Bsb_build_schemas.language with
10958+ match Map_string.find_opt map Bsb_build_schemas.gentypeconfig with
1095910959 | None -> ""
10960- | Some (Str {str}) -> str
10960+ | Some (Obj { map }) ->
10961+ (match Map_string.find_opt map Bsb_build_schemas.language with
10962+ | None -> ""
10963+ | Some (Str {str}) -> str
10964+ | Some _ -> "")
1096110965 | Some _ -> ""
1096210966 in
1096310967 Ext_option.iter (Map_string.find_opt map Bsb_build_schemas.sources) begin fun config ->
Original file line number Diff line number Diff line change @@ -10987,9 +10987,13 @@ let clean_re_js root =
1098710987 | None -> Set_string.empty
1098810988 in
1098910989 let gentype_language =
10990- match Map_string.find_opt map Bsb_build_schemas.language with
10990+ match Map_string.find_opt map Bsb_build_schemas.gentypeconfig with
1099110991 | None -> ""
10992- | Some (Str {str}) -> str
10992+ | Some (Obj { map }) ->
10993+ (match Map_string.find_opt map Bsb_build_schemas.language with
10994+ | None -> ""
10995+ | Some (Str {str}) -> str
10996+ | Some _ -> "")
1099310997 | Some _ -> ""
1099410998 in
1099510999 Ext_option.iter (Map_string.find_opt map Bsb_build_schemas.sources) begin fun config ->
Original file line number Diff line number Diff line change @@ -407641,7 +407641,7 @@ let check_and_discard (args : Ast_compatible.args) =
407641407641
407642407642type app_pattern = {
407643407643 op : string;
407644- loc : Location.t;
407644+ loc : Location.t; (* locatoin is the location of whole expression #4451 *)
407645407645 args : Parsetree.expression list
407646407646}
407647407647
@@ -407652,10 +407652,10 @@ let sane_property_name_check loc s =
407652407652(* match fn as *)
407653407653let view_as_app (fn : exp) s : app_pattern option =
407654407654 match fn.pexp_desc with
407655- | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; loc }}, args )
407655+ | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; _ }}, args )
407656407656 when Ext_list.has_string s op
407657407657 ->
407658- Some {op; loc; args = check_and_discard args}
407658+ Some {op; loc = fn.pexp_loc ; args = check_and_discard args}
407659407659 | _ -> None
407660407660
407661407661
Original file line number Diff line number Diff line change @@ -407641,7 +407641,7 @@ let check_and_discard (args : Ast_compatible.args) =
407641407641
407642407642type app_pattern = {
407643407643 op : string;
407644- loc : Location.t;
407644+ loc : Location.t; (* locatoin is the location of whole expression #4451 *)
407645407645 args : Parsetree.expression list
407646407646}
407647407647
@@ -407652,10 +407652,10 @@ let sane_property_name_check loc s =
407652407652(* match fn as *)
407653407653let view_as_app (fn : exp) s : app_pattern option =
407654407654 match fn.pexp_desc with
407655- | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; loc }}, args )
407655+ | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; _ }}, args )
407656407656 when Ext_list.has_string s op
407657407657 ->
407658- Some {op; loc; args = check_and_discard args}
407658+ Some {op; loc = fn.pexp_loc ; args = check_and_discard args}
407659407659 | _ -> None
407660407660
407661407661
Original file line number Diff line number Diff line change @@ -22153,7 +22153,7 @@ let check_and_discard (args : Ast_compatible.args) =
2215322153
2215422154type app_pattern = {
2215522155 op : string;
22156- loc : Location.t;
22156+ loc : Location.t; (* locatoin is the location of whole expression #4451 *)
2215722157 args : Parsetree.expression list
2215822158}
2215922159
@@ -22164,10 +22164,10 @@ let sane_property_name_check loc s =
2216422164(* match fn as *)
2216522165let view_as_app (fn : exp) s : app_pattern option =
2216622166 match fn.pexp_desc with
22167- | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; loc }}, args )
22167+ | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; _ }}, args )
2216822168 when Ext_list.has_string s op
2216922169 ->
22170- Some {op; loc; args = check_and_discard args}
22170+ Some {op; loc = fn.pexp_loc ; args = check_and_discard args}
2217122171 | _ -> None
2217222172
2217322173
Original file line number Diff line number Diff line change @@ -411380,7 +411380,7 @@ let check_and_discard (args : Ast_compatible.args) =
411380411380
411381411381type app_pattern = {
411382411382 op : string;
411383- loc : Location.t;
411383+ loc : Location.t; (* locatoin is the location of whole expression #4451 *)
411384411384 args : Parsetree.expression list
411385411385}
411386411386
@@ -411391,10 +411391,10 @@ let sane_property_name_check loc s =
411391411391(* match fn as *)
411392411392let view_as_app (fn : exp) s : app_pattern option =
411393411393 match fn.pexp_desc with
411394- | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; loc }}, args )
411394+ | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident op; _ }}, args )
411395411395 when Ext_list.has_string s op
411396411396 ->
411397- Some {op; loc; args = check_and_discard args}
411397+ Some {op; loc = fn.pexp_loc ; args = check_and_discard args}
411398411398 | _ -> None
411399411399
411400411400
You can’t perform that action at this time.
0 commit comments