@@ -437,7 +437,7 @@ let process_obj
437437 {obj_arg_label = External_arg_spec. obj_label s; obj_arg_type},
438438 {param_type with ty = new_ty}::arg_types,
439439 (({Asttypes. txt = name; loc}, [] , Ast_literal. type_int ~loc () ) :: result_types)
440- | Poly_var { has_payload = false ; _} ->
440+ | Poly_var_string _ ->
441441 let s = Lam_methname. translate name in
442442 {obj_arg_label = External_arg_spec. obj_label s; obj_arg_type},
443443 {param_type with ty = new_ty }::arg_types,
@@ -446,7 +446,7 @@ let process_obj
446446 Location. raise_errorf ~loc
447447 " The combination of [@@bs.obj], [@@bs.uncurry] is not supported yet"
448448 | Extern_unit -> assert false
449- | Poly_var { has_payload = true ; _}
449+ | Poly_var _
450450 ->
451451 Location. raise_errorf ~loc
452452 " bs.obj label %s does not support such arg type" name
@@ -470,7 +470,7 @@ let process_obj
470470 {obj_arg_label = External_arg_spec. optional s ; obj_arg_type },
471471 param_type :: arg_types,
472472 (({Asttypes. txt = name; loc}, [] , Ast_comb. to_undefined_type loc @@ Ast_literal. type_int ~loc () ) :: result_types)
473- | Poly_var { has_payload = false ; _} ->
473+ | Poly_var_string _ ->
474474 let s = Lam_methname. translate name in
475475 {obj_arg_label = External_arg_spec. optional s ; obj_arg_type },
476476 param_type::arg_types,
@@ -482,7 +482,7 @@ let process_obj
482482 Location. raise_errorf ~loc
483483 " The combination of [@@bs.obj], [@@bs.uncurry] is not supported yet"
484484 | Extern_unit -> assert false
485- | Poly_var {has_payload = true ; _}
485+ | Poly_var _
486486 ->
487487 Location. raise_errorf ~loc
488488 " bs.obj label %s does not support such arg type" name
@@ -896,7 +896,7 @@ let handle_attributes
896896 | Optional s ->
897897 let arg_type = get_opt_arg_type ~nolabel: false ty in
898898 begin match arg_type with
899- | Poly_var { has_payload = true ; _} ->
899+ | Poly_var _ ->
900900 (* ?x:([`x of int ] [@bs.string]) does not make sense *)
901901 Location. raise_errorf
902902 ~loc
0 commit comments