mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-23 07:45:23 +00:00
fixes #22153
It's a problem for refc because you cannot index a nil string: i.e.
`[""]` is `{((NimStringDesc*) NIM_NIL)}` which cannot be indexed
(cherry picked from commit 9bb7e53e7f)
This commit is contained in:
@@ -13,3 +13,11 @@ var info = ForkedEpochInfo(kind: true)
|
||||
doAssert info.kind
|
||||
info.kind = false
|
||||
doAssert not info.kind
|
||||
|
||||
block: # bug #22153
|
||||
discard allocCStringArray([""])
|
||||
discard allocCStringArray(["1234"])
|
||||
|
||||
var s = "1245"
|
||||
s.add "1"
|
||||
discard allocCStringArray([s])
|
||||
|
||||
Reference in New Issue
Block a user