summaryrefslogtreecommitdiff
path: root/testsuite/tests/generalized-open/gpr1506.ml
diff options
context:
space:
mode:
authorKC Sivaramakrishnan <kc@kcsrk.info>2022-06-06 09:43:46 +0530
committerKC Sivaramakrishnan <kc@kcsrk.info>2022-06-06 10:01:50 +0530
commitca209a6c15204b2a8de6b902ca50df50671c6e84 (patch)
tree5c9bf8945937ca0ef96da76b464e26916bf079c8 /testsuite/tests/generalized-open/gpr1506.ml
parent73af343dbeb7fc5551d4453d140c2e539b0748c0 (diff)
downloadocaml-ca209a6c15204b2a8de6b902ca50df50671c6e84.tar.gz
Refine the semantics of domain callbacks.
This PR (#11213) addresses issues pointed out in #11176 and #11178. It makes the following changes: * `Domain.at_exit` is now domain-local. * `Domain.at_exit` also used to ignore exceptions. Now, these exceptions are surfaced as the result of domain execution (similar to how `Stdlib.at_exit` works). * `Domain.at_startup` is renamed to `Domain.at_each_spawn`. * `Domain.at_first_spawn` is renamed to `Domain.before_first_spawn`. * `Domain.before_first_spawn` and `Domain.at_each_spawn` run the callbacks in FIFO order (as requested in #11178). The PR also adds tests to the test suite.
Diffstat (limited to 'testsuite/tests/generalized-open/gpr1506.ml')
-rw-r--r--testsuite/tests/generalized-open/gpr1506.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/testsuite/tests/generalized-open/gpr1506.ml b/testsuite/tests/generalized-open/gpr1506.ml
index bd72ed302f..f6919c78f4 100644
--- a/testsuite/tests/generalized-open/gpr1506.ml
+++ b/testsuite/tests/generalized-open/gpr1506.ml
@@ -103,9 +103,9 @@ include struct open struct type t = T end let x = T end
Line 1, characters 15-41:
1 | include struct open struct type t = T end let x = T end
^^^^^^^^^^^^^^^^^^^^^^^^^^
-Error: The type t/337 introduced by this open appears in the signature
+Error: The type t/338 introduced by this open appears in the signature
Line 1, characters 46-47:
- The value x has no valid type if t/337 is hidden
+ The value x has no valid type if t/338 is hidden
|}];;
module A = struct
@@ -123,9 +123,9 @@ Lines 3-6, characters 4-7:
4 | type t = T
5 | let x = T
6 | end
-Error: The type t/342 introduced by this open appears in the signature
+Error: The type t/343 introduced by this open appears in the signature
Line 7, characters 8-9:
- The value y has no valid type if t/342 is hidden
+ The value y has no valid type if t/343 is hidden
|}];;
module A = struct
@@ -142,9 +142,9 @@ Lines 3-5, characters 4-7:
3 | ....open struct
4 | type t = T
5 | end
-Error: The type t/347 introduced by this open appears in the signature
+Error: The type t/348 introduced by this open appears in the signature
Line 6, characters 8-9:
- The value y has no valid type if t/347 is hidden
+ The value y has no valid type if t/348 is hidden
|}]
(* It was decided to not allow this anymore. *)