An enumeration type is distinct from an integer. In your sample, var does not evaluate to int, it evaluates to the enumeration type. You would get the same output if you had used the enumeration type itself.
Enumeration types output the name when printed, not their value.