support cstring in case (#20130)
* implement case for cstring for now just converts to string on C backend * custom implementation for cstring * remove leftover * revert even more * add nil + fix packages weird variant literal bug * update docs
This commit is contained in:
parent
1f838d9af1
commit
a95b6391fd
13 changed files with 126 additions and 18 deletions
|
|
@ -966,7 +966,7 @@ proc allPathsAsgnResult(n: PNode): InitResultEnum =
|
|||
if containsResult(n[0]): return InitRequired
|
||||
result = InitSkippable
|
||||
var exhaustive = skipTypes(n[0].typ,
|
||||
abstractVarRange-{tyTypeDesc}).kind notin {tyFloat..tyFloat128, tyString}
|
||||
abstractVarRange-{tyTypeDesc}).kind notin {tyFloat..tyFloat128, tyString, tyCstring}
|
||||
for i in 1..<n.len:
|
||||
let it = n[i]
|
||||
allPathsInBranch(it.lastSon)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue