Change in behavior of UndefVarError(::Symbol)
constructor breaks @test_throws
in 1.11.0-beta1
#54082
Labels
domain:error handling
Handling of exceptions by Julia or the user
testsystem
The unit testing framework and Test stdlib
MWE
Here is the MWE:
On Julia 1.10.2, this MWE works fine:
On Julia 1.11.0-beta1, the MWE is broken:
Similarly, on Julia nightly (1.12.0-DEV.339 / b9aeafa), the MWE is broken in the same way: (click to expand)
The issue here is that the behavior of the
UndefVarError(::Symbol)
constructor has changed between 1.10.2 and 1.11.0-beta1.The
UndefVarError(::Symbol)
constructor is in the manual. So, some questions are:UndefVarError(::Symbol)
constructor is public API?@test_throws
to avoid this specific use case from breaking?My initial thought is that this isn't a breaking change, and that we don't need to fix it in Julia; instead, we can just tell users to fix their code, e.g.:
But I'm curious to hear what other people think.
The text was updated successfully, but these errors were encountered: