trying to place the min into the range doesn't seem to do the trick either:

> test.nim(14, 12) Error: cannot prove: y * w + x <= len(s) + -1 (bounds check)
    
    
    import strutils
    import threadpool
    {.experimental: "parallel".}
    
    let
      w = 3
      h = 3
    
    var s = 'a'.repeat(w*h)
    
    for y in 0..<h:
      parallel:
        for x in 0..<min(w, s.len - (y*w+w)):
          s[y*w+x] = spawn chr(1)
    
    
    Run

Reply via email to