Open
Description
Give a better error message, recommending @as_record B
.
julia> struct B
a
b
c
end
julia> @match B(1,2,3) begin
B(a,b,c) => (a,b,c)
end
ERROR: LoadError: PatternCompilationError(:(#= REPL[5]:2 =#), MethodError(MLStyle.MatchImpl.pattern_uncall, (B, MLStyle.MatchImpl.ModuleBoundedEx2tf(Main), Any[], Any[], Any[:a, :b, :c]), 0x0000000000007b2f))
in expression starting at REPL[5]:1
caused by: MethodError: no method matching pattern_uncall(::Type{B}, ::MLStyle.MatchImpl.ModuleBoundedEx2tf, ::Vector{Any}, ::Vector{Any}, ::SubArray{Any, 1, Vector{Any}, Tuple{UnitRange{Int64}}, true})
Metadata
Metadata
Assignees
Labels
No labels