Yo guyz, I'm on Nim devel (nim -v says 0.18.1).
This snippet of code gives me the ProveInit warning.
type
Glyph = range['a'..'z']
type
Cell = tuple
g: Glyph
fg, bg: int
var c: Cell
Specifically, the last line gives me the warning. I checked on GitHub, and it seems that this issue was solved in 0.18. Anyone else having the same problem?
Hmm, I thought the compiler would be smart enough to have a range type default to its type.low value.
Although, even adding a
c.g = 'a'
immediately below the declaration doesn't remove the warning.
It seems that the only way to avoid this is by fusing declaration and definition, like this:
var c: Cell = (g: Glyph('a'), fg: 0, bg: 0)