JuliaServices / Match.jl

Advanced Pattern Matching for Julia
https://juliaservices.github.io/Match.jl/latest/
Other
240 stars 22 forks source link

Matching types gives wrong answers #61

Closed rdeits closed 4 years ago

rdeits commented 4 years ago

Here's a simple example of trying to match a type:

julia> T = Int
Int64

julia> @match T begin
         Float64 => println("float")
         Int => println("int")
       end
float

Somehow Int ends up matching Float64, not Int.

rdeits commented 4 years ago

Looks like I was misunderstanding the expected behavior, per https://github.com/thautwarm/MLStyle.jl/issues/91