@@ -612,9 +612,9 @@ val foo : unit -> unit = <fun>
612
612
|}]
613
613
614
614
(* Testing modalities in records *)
615
- type r_global = {x : string ; global_ y : string }
615
+ type r_shared = {x : string ; y : string @@ shared many }
616
616
[%% expect{|
617
- type r_global = { x : string ; global_ y : string ; }
617
+ type r_shared = { x : string ; y : string @@ many shared ; }
618
618
|}]
619
619
620
620
let foo () =
@@ -697,14 +697,14 @@ Line 3, characters 19-20:
697
697
| }]
698
698
699
699
(* testing modalities in constructors *)
700
- type r_global = R_global of string * global_ string
700
+ type r_shared = R_shared of string * string @@ shared many
701
701
[%% expect{|
702
- type r_global = R_global of string * global_ string
702
+ type r_shared = R_shared of string * string @@ many shared
703
703
|}]
704
704
705
705
let foo () =
706
- let r = R_global (" hello" , " world" ) in
707
- let R_global (_, y) = r in
706
+ let r = R_shared (" hello" , " world" ) in
707
+ let R_shared (_, y) = r in
708
708
ignore (shared_id y);
709
709
(* the following is allowed, because using r uniquely implies using r.x
710
710
shared *)
@@ -715,17 +715,17 @@ val foo : unit -> unit = <fun>
715
715
716
716
(* Similarly for linearity *)
717
717
let foo () =
718
- let r = once_ (R_global (" hello" , " world" )) in
719
- let R_global (_, y) = r in
718
+ let r = once_ (R_shared (" hello" , " world" )) in
719
+ let R_shared (_, y) = r in
720
720
ignore_once y;
721
721
ignore_once r;
722
722
[%% expect{|
723
723
val foo : unit -> unit = < fun>
724
724
|}]
725
725
726
726
let foo () =
727
- let r = once_ (R_global (" hello" , " world" )) in
728
- let R_global (x, _) = r in
727
+ let r = once_ (R_shared (" hello" , " world" )) in
728
+ let R_shared (x, _) = r in
729
729
ignore_once x;
730
730
ignore_once r;
731
731
[%% expect{|
@@ -741,8 +741,8 @@ Line 4, characters 14-15:
741
741
|}]
742
742
743
743
let foo () =
744
- let r = R_global (" hello" , " world" ) in
745
- let R_global (x, _) = r in
744
+ let r = R_shared (" hello" , " world" ) in
745
+ let R_shared (x, _) = r in
746
746
ignore (shared_id x);
747
747
(* doesn't work for normal fields *)
748
748
ignore (unique_id r)
0 commit comments