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 target error on Nim 1.6 #123

Closed
nitely opened this issue Aug 13, 2023 · 5 comments
Closed

JS target error on Nim 1.6 #123

nitely opened this issue Aug 13, 2023 · 5 comments

Comments

@nitely
Copy link
Owner

nitely commented Aug 13, 2023

$ nim js -r src/regex.nim
Hint: used config file '/home/esteban/.choosenim/toolchains/nim-1.6.14/config/nim.cfg' [Conf]
Hint: used config file '/home/esteban/.choosenim/toolchains/nim-1.6.14/config/config.nims' [Conf]
...........................................................................................fatal.nim(54)            sysFatal
Error: unhandled exception: types.nim(1738, 11) `ty.kind in {tyTuple, tyObject}`  [AssertionDefect]
@nitely
Copy link
Owner Author

nitely commented Aug 13, 2023

Whatever this is seems to be fixed in Nim 2.0.0

nitely added a commit that referenced this issue Aug 13, 2023
@Ethosa
Copy link
Contributor

Ethosa commented Aug 25, 2023

@Ethosa
Copy link
Contributor

Ethosa commented Aug 25, 2023

distinct keyword throws this exception in Nim < 2.0.0
nim-lang/Nim#20227

@Ethosa
Copy link
Contributor

Ethosa commented Aug 25, 2023

@nitely it's possible to remove distinct keyword and create a new object with same fields? I can send PR to fix this bug.

@nitely
Copy link
Owner Author

nitely commented Aug 25, 2023

It's a Nim regression. It works fine in Nim 1.0.10 and 1.2.12.

And I don't think you can fix it in nim-regex because the distinct is needed, IIRC, but you can try.

Ethosa added a commit to Ethosa/nim-regex that referenced this issue Aug 25, 2023
nitely pushed a commit that referenced this issue Sep 1, 2023
@nitely nitely closed this as completed Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants