You can avoid the warning by having the enum start at 0: type MouseButton* = enum mbNone mbLeft = 1 mbMiddle = 2 mbRight = 3
Since enum default to the value 0, and your enum starts at 1, the default value of your enum is invalid: type MouseButton* = enum mbLeft = 1 mbMiddle = 2 var ml : MouseButton echo ml #> 0 (invalid data!) Actually, I think that you can make it start from whatever value you want, eg. -23, as long as your enum contains a value for 0, but I haven't tested it. (note that even if you start from a negative number, the default value of the enum is the one that corresponds to 0, not the first one in the list)