Just updated my project deps and am getting this really strange error with a Match.jl @match statement.
ERROR: The type `Dates.Date` has 1 fields but the pattern expects 3 fields.
@match date begin
Date(2023, 4, 10) => true # Monday after Easter
Date(2023, 5, 1) => true # May Day?
end
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] bind_pattern!(location::LineNumberNode, source::Expr, input::Symbol, binder::Match.BinderContext, assigned::Base.ImmutableDict{Symbol, Symbol})
@ Match ~/.julia/packages/Match/SZDEk/src/binding.jl:244
[3] bind_case(case_number::Int64, location::LineNumberNode, case::Expr, predeclared_temps::Vector{Any}, binder::Match.BinderContext)
@ Match ~/.julia/packages/Match/SZDEk/src/binding.jl:580
[4] build_automaton_core(value::Symbol, source_cases::Vector{Any}, location::LineNumberNode, predeclared_temps::Vector{Any}, binder::Match.BinderContext)
@ Match ~/.julia/packages/Match/SZDEk/src/match_cases_opt.jl:15
[5] build_automaton(location::LineNumberNode, mod::Module, value::Any, body::Expr)
@ Match ~/.julia/packages/Match/SZDEk/src/match_cases_opt.jl:149
[6] build_deduplicated_automaton
@ ~/.julia/packages/Match/SZDEk/src/match_cases_opt.jl:158 [inlined]
[7] handle_match_cases(location::LineNumberNode, mod::Module, value::Symbol, body::Expr)
@ Match ~/.julia/packages/Match/SZDEk/src/match_cases_opt.jl:477
[8] var"@match"(__source__::LineNumberNode, __module__::Module, value::Any, cases::Any)
@ Match ~/.julia/packages/Match/SZDEk/src/matchmacro.jl:114
[9] include(mod::Module, _path::String)
@ Base ./Base.jl:457
[10] include(x::String)
@ Main.Tibra ~/src/tibra/Tibra.jl/src/Tibra.jl:1
[11] top-level scope
@ ~/src/tibra/Tibra.jl/src/Tibra.jl:101
[12] include(fname::String)
@ Base.MainInclude ./client.jl:478
[13] top-level scope
@ ~/src/tibra/Tibra.jl/scripts/run_tibrax_server.jl:1