Sorry, just found that one can use `tmp.orange` to refer the value.


On Sunday, November 22, 2015 at 12:12:56 PM UTC+1, Sisyphuss wrote:
>
> Let's see this example:
> ```
> module tmp
>
> export FRUIT, f, apple
>
> @enum FRUIT apple=1 orange=2 kiwi=3
>
> f(x::FRUIT) = "I'm a FRUIT with value: $(Int(x))"
>
> end
> ```
>
> f(apple) works fine
> f(orange) doesn't work
> f(FRUIT.apple) doesn't work either. 
>
> An enumerate type is of no use, if can't use its values. 
> Therefore, export an enumerate type should implicitly export its values.
>

Reply via email to