You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifVERSION>=v"1.8"@testset"warn for unreachable cases"beginlet line = (@__LINE__) +4@test_warn(
"$file:$line: Case 2: `Foo(1, 2) =>` is not reachable.",
# Test macros remove line number nodes, so we can only get the start of it@eval@match2Foo(1, 2) begin; Foo(_, _) =>1; Foo(1, 2) =>2; end
)
endendend
Specifically, the comment is incorrect. Test macros do no such thing. I have a similar test in AutoHashEqualsCached.jl that works with no such accommodation. I suspect the reason the line numbers were wrong in this test is that the pattern-matching implementation has a bug in tracking the line numbers. Fix the bug and the line numbers will be correct.
The text was updated successfully, but these errors were encountered:
gafter
transferred this issue from JuliaServices/Rematch2.jl
Aug 3, 2023
The following test is not correct:
Specifically, the comment is incorrect. Test macros do no such thing. I have a similar test in
AutoHashEqualsCached.jl
that works with no such accommodation. I suspect the reason the line numbers were wrong in this test is that the pattern-matching implementation has a bug in tracking the line numbers. Fix the bug and the line numbers will be correct.The text was updated successfully, but these errors were encountered: