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

[JS] Confusing error message #12671

Closed
dawkot opened this issue Nov 16, 2019 · 1 comment · Fixed by #14125
Closed

[JS] Confusing error message #12671

dawkot opened this issue Nov 16, 2019 · 1 comment · Fixed by #14125

Comments

@dawkot
Copy link

dawkot commented Nov 16, 2019

Function echo outputs the wrong string.

Example

proc foo =
  var x: seq[int]
  inc x[0]

foo()

Current Output

Uncaught TypeError: Cannot read property 'length' of null
    at foo_42003 (x.js:531)
    at x.js:536

Expected Output

Information that no element of such index exists

Additional Information

$ nim -v
Nim Compiler Version 1.0.2
@metagn
Copy link
Collaborator

metagn commented Apr 26, 2020

Now gives index out of bounds, the container is empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants