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
@jamii
It can be matched, the reason for your prob is, @m has an AST formed as Expr(:macrocall, Symbol("@m"), ::LineNumberNode, <args...>), while you missed the LineNumberNode.
julia> Pkg.status()
Status `~/.julia/environments/v1.6/Project.toml`
[7eb4fadd] Match v2.0.0
julia> @match :(@when a < b) begin
Expr(_, [Symbol("@when"), _], _) => :ok
Expr(_, [other, _], _) => other
end
ERROR: LoadError: REPL[59]:2: The type `Expr` has 2 fields but the pattern expects 3 fields.
julia> @match :(@when a < b) begin
Expr(_, [Symbol("@when"), _::LineNumberNode, _]) => :ok
Expr(_, [other, _, _]) => other
end
:ok
Using Julia 0.5.0-rc4+0 and Match 0.2.2
The text was updated successfully, but these errors were encountered: