Open
Description
The current behavior for const and {.global.} is somewhat confusing; I'm not sure if this is intended behavior or not.
Example
proc unique: int =
var id {.global.} = 0
result = id
id += 1
const x = unique()
const y = unique()
let z = unique()
let w = unique()
echo x
echo y
echo z
echo w
Current Output
0
0
0
1
Expected Output
Either
0
1
0
1
or
0
1
2
3
depending upon what is deemed "correct."