Skip to content

Commit

Permalink
fix ptyp_alias
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
Hugo Heuzard authored and panglesd committed Dec 7, 2023
1 parent a0803d9 commit 5a051d8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion astlib/ast_502.ml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module Parsetree = struct
- [T #tconstr] when [l=[T]],
- [(T1, ..., Tn) #tconstr] when [l=[T1 ; ... ; Tn]].
*)
| Ptyp_alias of core_type * string (** [T as 'a]. *)
| Ptyp_alias of core_type * string loc (** [T as 'a]. *)
| Ptyp_variant of row_field list * closed_flag * label list option
(** [Ptyp_variant([`A;`B], flag, labels)] represents:
- [[ `A|`B ]]
Expand Down
2 changes: 1 addition & 1 deletion astlib/migrate_501_502.ml
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ and copy_core_type_desc :
Ast_502.Parsetree.Ptyp_class
(copy_loc copy_Longident_t x0, List.map copy_core_type x1)
| Ast_501.Parsetree.Ptyp_alias (x0, x1) ->
Ast_502.Parsetree.Ptyp_alias (copy_core_type x0, x1)
Ast_502.Parsetree.Ptyp_alias (copy_core_type x0, { Ast_502.Asttypes.txt = x1; loc = x0.ptyp_loc } )
| Ast_501.Parsetree.Ptyp_variant (x0, x1, x2) ->
Ast_502.Parsetree.Ptyp_variant
( List.map copy_row_field x0,
Expand Down
2 changes: 1 addition & 1 deletion astlib/migrate_502_501.ml
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ and copy_core_type_desc loc :
Ast_501.Parsetree.Ptyp_class
(copy_loc copy_Longident_t x0, List.map copy_core_type x1)
| Ast_502.Parsetree.Ptyp_alias (x0, x1) ->
Ast_501.Parsetree.Ptyp_alias (copy_core_type x0, x1)
Ast_501.Parsetree.Ptyp_alias (copy_core_type x0, x1.txt)
| Ast_502.Parsetree.Ptyp_variant (x0, x1, x2) ->
Ast_501.Parsetree.Ptyp_variant
( List.map copy_row_field x0,
Expand Down

0 comments on commit 5a051d8

Please sign in to comment.