File tree 2 files changed +2
-24
lines changed
2 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -349,27 +349,6 @@ type response = {
349
349
no_inline_cross_module : bool ;
350
350
}
351
351
352
- let get_maybe_obj_field_alias attributes =
353
- attributes
354
- |> List. find_map (fun (attr : Parsetree.attribute ) ->
355
- match attr with
356
- | ( {txt = " as" ; _},
357
- PStr
358
- [
359
- {
360
- pstr_desc =
361
- Pstr_eval
362
- ( {
363
- pexp_desc = Pexp_constant (Pconst_string (alias, _));
364
- _;
365
- },
366
- _ );
367
- _;
368
- };
369
- ] ) ->
370
- Some alias
371
- | _ -> None )
372
-
373
352
let process_obj (loc : Location.t ) (st : external_desc ) (prim_name : string )
374
353
(arg_types_ty : Ast_core_type.param_type list )
375
354
(result_type : Ast_core_type.t ) : Parsetree. core_type * External_ffi_types. t
@@ -421,7 +400,7 @@ let process_obj (loc : Location.t) (st : external_desc) (prim_name : string)
421
400
" expect label, optional, or unit here" )
422
401
| Labelled label -> (
423
402
let fieldName =
424
- match get_maybe_obj_field_alias param_type.attr with
403
+ match Ast_attributes. iter_process_bs_string_as param_type.attr with
425
404
| Some alias -> alias
426
405
| None -> label
427
406
in
@@ -481,7 +460,7 @@ let process_obj (loc : Location.t) (st : external_desc) (prim_name : string)
481
460
" %@obj label %s does not support %@unwrap arguments" label)
482
461
| Optional label -> (
483
462
let fieldName =
484
- match get_maybe_obj_field_alias param_type.attr with
463
+ match Ast_attributes. iter_process_bs_string_as param_type.attr with
485
464
| Some alias -> alias
486
465
| None -> label
487
466
in
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ and addAnnotationsToFields ~config (expr : Typedtree.expression)
57
57
| _ -> (fields, argTypes)
58
58
[@@ live]
59
59
60
- [@@ live]
61
60
(* * Recover from expr the renaming annotations on named arguments. *)
62
61
let addAnnotationsToFunctionType ~config (expr : Typedtree.expression )
63
62
(type_ : type_ ) =
You can’t perform that action at this time.
0 commit comments