diff --git a/base/expr.jl b/base/expr.jl index c37f1a6482162..e45684f95a34f 100644 --- a/base/expr.jl +++ b/base/expr.jl @@ -513,6 +513,13 @@ The `:consistent` setting asserts that for egal (`===`) inputs: even for the same world age (e.g. because one ran in the interpreter, while the other was optimized). +!!! note + The `:consistent`-cy assertion currrently includes the assertion that the function + will not execute any undefined behavior (for any input). Note that undefined behavior + may technically cause the function to violate other effect assertions (such as + `:nothrow` or `:effect_free`) as well, but we do not model this, and all effects + except `:consistent` assume the absence of undefined behavior. + !!! note If `:consistent` functions terminate by throwing an exception, that exception itself is not required to meet the egality requirement specified above.