Skip to content

Commit

Permalink
refine the docstring a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Jun 18, 2024
1 parent 3f6d21c commit f005c05
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions base/experimental.jl
Original file line number Diff line number Diff line change
Expand Up @@ -375,18 +375,20 @@ non-overlayed method call.
More formally, when evaluating a generic function call ``f(x)`` at a specific world age
``i``, if a regular method call ``fᵢ(x)`` is redirected to an overlay method call ``fᵢ′(x)``
defined by this macro, it must be ensured that ``fᵢ(x) ≡ fᵢ′(x)``.
defined by this macro, ``fᵢ(x)`` and ``fᵢ′(x)`` are considered `:consistent` if the following
conditions are met:
- If ``fᵢ(x)`` returns a value ``y``, then ``fᵢ′(x)`` also returns some value ``yᵢ``, and ``y ≡ yᵢ`` holds.
- If ``fᵢ(x)`` throws an exception, then ``fᵢ′(x)`` also throws some exception.
For a detailed definition of `:consistent`-cy, consult the corresponding section in
[`Base.@assume_effects`](@ref).
!!! note
Note that the requirements for `:consistent`-cy include not only that the return values
are egal, but also that the manner of termination is the same.
However, it's important to aware that when they throw exceptions, the exceptions
themselves don't necessarily have to be egal as explained in the note of `:consistent`.
In other words, if ``fᵢ(x)`` throws an exception, ``fᵢ′(x)`` is required to also throw
one, but the exact exceptions may differ.
are egal, but also that the manner of termination is the same. However, it's important
to aware that when they throw exceptions, the exceptions themselves don't necessarily
have to be egal. In other words, if ``fᵢ(x)`` throws an exception, ``fᵢ′(x)`` is
required to also throw one, but the exact exceptions may differ.
!!! note
Please note that the `:consistent`-cy requirement applies not to method itself but to
Expand Down

0 comments on commit f005c05

Please sign in to comment.