Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seq Error: unhandled exception: value out of range: 32772 #11606

Closed
retsyo opened this issue Jun 27, 2019 · 0 comments

Comments

@retsyo
Copy link

commented Jun 27, 2019

first let us create a sequence with many many items

import random
var f = open("test.nim", fmWrite)
f.write("let w = @[")

for i in 0 .. 10000:
    f.write($rand(255))
    f.write(", ")
f.write("]")
f.close()

which will produce

let w = @[207, 216, 5, ...,]

then let us compile the generated test.nim
for

Nim Compiler Version 0.20.99 [Windows: amd64]
Compiled at 2019-06-27
Copyright (c) 2006-2019 by Andreas Rumpf

I get

Hint: test [Processing]
..\lib\system\fatal.nim(48) sysFatal
Error: unhandled exception: value out of range: 32772 [RangeError]

but

$ /e/prg/nim/nim-0.19.2/bin/nim c -r test.nim
Hint: used config file 'E:\prg\nim\nim-0.19.2\config\nim.cfg' [Conf]
Hint: system [Processing]
Hint: test [Processing]
Hint:  [Link]
Hint: operation successful (12376 lines compiled; 0.971 sec total; 25.18MiB peakmem; Debug Build) [SuccessX]
Hint: R:\test.exe  [Exec]

so, what is the problem? Thanks

@Araq Araq closed this in 3606e03 Jun 28, 2019

narimiran added a commit that referenced this issue Jul 2, 2019

fixes #11606
(cherry picked from commit 3606e03)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.