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

string literal copy error after making it empty #24080

Closed
levovix0 opened this issue Sep 7, 2024 · 0 comments · Fixed by #24083
Closed

string literal copy error after making it empty #24080

levovix0 opened this issue Sep 7, 2024 · 0 comments · Fixed by #24083

Comments

@levovix0
Copy link

levovix0 commented Sep 7, 2024

Description

var a = (s: "a")
var b = "a"
a.s.setLen 0
b = a.s
assert b == ""

Nim Version

Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-07-03
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 5935c3b
active boot switches: -d:release

Current Output

assertion error

Expected Output

nothing

Known Workarounds

No response

Additional Information

No response

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.

2 participants