PatternDispatch.jl
PatternDispatch.jl copied to clipboard
Package is not working in Julia 0.2
trafficstars
Trying to run first example from documentation gives error:
using PatternDispatch
@pattern f(x) = x
@pattern f(2) = 42
println({f(x) for x=1:4})
Warning: using Base.Meta in module Meta conflicts with an existing identifier.
ERROR: syntax: malformed function argument (call (top typeassert) (call (top get
field) #<julia_value> 'args) (call (top apply_type) Vararg Any))
at C:\test.jl:1
Seems like this must have been caused by some change in Julia's AST format. I'll see if I get some time to look at it.
I think that I found the cause. I've submitted a bug report with Julia: https://github.com/JuliaLang/julia/issues/4771. If it's not fixed soon, I can implement a workaround.
also 0.4.