Skip to content

Commit 32c6c99

Browse files
committed
refine the docstring a bit
1 parent 3f6d21c commit 32c6c99

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

base/experimental.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,18 +375,20 @@ non-overlayed method call.
375375
376376
More formally, when evaluating a generic function call ``f(x)`` at a specific world age
377377
``i``, if a regular method call ``fᵢ(x)`` is redirected to an overlay method call ``fᵢ′(x)``
378-
defined by this macro, it must be ensured that ``fᵢ(x) ≡ fᵢ′(x)``.
378+
defined by this macro, ``fᵢ(x)`` and ``fᵢ′(x)`` are considered `:consistent` if the following
379+
conditions are met:
380+
- If `fᵢ(x)` returns a value `y`, then `fᵢ′(x)` also returns some value `yᵢ`, and `y ≡ yᵢ` holds.
381+
- If `fᵢ(x)` throws an exception, then `fᵢ′(x)` also throws some exception.
379382
380383
For a detailed definition of `:consistent`-cy, consult the corresponding section in
381384
[`Base.@assume_effects`](@ref).
382385
383386
!!! note
384387
Note that the requirements for `:consistent`-cy include not only that the return values
385-
are egal, but also that the manner of termination is the same.
386-
However, it's important to aware that when they throw exceptions, the exceptions
387-
themselves don't necessarily have to be egal as explained in the note of `:consistent`.
388-
In other words, if ``fᵢ(x)`` throws an exception, ``fᵢ′(x)`` is required to also throw
389-
one, but the exact exceptions may differ.
388+
are egal, but also that the manner of termination is the same. However, it's important
389+
to aware that when they throw exceptions, the exceptions themselves don't necessarily
390+
have to be egal. In other words, if ``fᵢ(x)`` throws an exception, ``fᵢ′(x)`` is
391+
required to also throw one, but the exact exceptions may differ.
390392
391393
!!! note
392394
Please note that the `:consistent`-cy requirement applies not to method itself but to

0 commit comments

Comments
 (0)