Hi Nim people,

I was using Nim for some Project Euler exercises. When I tried to compile with 
`nim c -r -d:debug test.nim`, it got stuck after printing
    
    
    Hint: used config file '/etc/nim/nim.cfg' [Conf]
    Hint: used config file '/etc/nim/config.nims' [Conf]
    ......
    
    
    Run

The processes `nim` and `nimsuggest` then completely pegged 2 of my CPU cores. 
I then had to kill the two processes in the terminal. I'm on Manjaro Linux.

I found the minimal code (`test.nim`) to cause this bug to be
    
    
    import sequtils
    
    const n = 2000000
    const list = toSeq(0..n)
    
    func f(): int =
      var i = 0
      const p = list[i]
      p
    
    
    Run

It seems like `n` has to be large. All variables have to be `const` except for 
`i`. If these two criteria are not met I get the correct error "cannot evaluate 
at compile time: list". 

Reply via email to