I have the following behavior (contrived example for demo purposes)
@enum Fruit apple orange kiwi
f(apple::String, fruit::Array{Fruit}) = fruit[1] == apple::Fruit
f("not apple", [apple])
ERROR: TypeError: in typeassert, expected Fruit, got a value of type String
It looks like the name of a parmeter (apple) clashes with the name of an enum (apple) and wins. Is there a way to specify within the function body that “apple” refers to the enum type?