diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-01-18 21:20:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 14:20:54 +0100 |
commit | 3379d26629f30e6be8d303a36e220d1039eb4551 (patch) | |
tree | 5609cc907464efcd30452da572c760a5aa215ef9 /tests/system/tsystem_misc.nim | |
parent | f46f26e79aada7195f4d83d8601f0d856520763d (diff) | |
download | Nim-3379d26629f30e6be8d303a36e220d1039eb4551.tar.gz |
fixes #23223; prevents `insert` self-assignment (#23225)
fixes #23223
Diffstat (limited to 'tests/system/tsystem_misc.nim')
-rw-r--r-- | tests/system/tsystem_misc.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/system/tsystem_misc.nim b/tests/system/tsystem_misc.nim index 7f5914725..c8e2b2a9d 100644 --- a/tests/system/tsystem_misc.nim +++ b/tests/system/tsystem_misc.nim @@ -212,3 +212,10 @@ block: doAssert not compiles(echo p.rawProc.repr) doAssert not compiles(echo p.rawEnv.repr) doAssert not compiles(echo p.finished) + +proc bug23223 = # bug #23223 + var stuff = "hello" + stuff.insert "" + doAssert stuff == "hello" + +bug23223() |