From a95b6391fd353074daf2dbfed4d73e8d57f314ca Mon Sep 17 00:00:00 2001 From: metagn Date: Thu, 1 Sep 2022 19:10:00 +0300 Subject: 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 --- compiler/dfa.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/dfa.nim') diff --git a/compiler/dfa.nim b/compiler/dfa.nim index 5b048ff6e..669207151 100644 --- a/compiler/dfa.nim +++ b/compiler/dfa.nim @@ -461,7 +461,7 @@ proc genCase(c: var Con; n: PNode) = # elsePart # Lend: let isExhaustive = skipTypes(n[0].typ, - abstractVarRange-{tyTypeDesc}).kind notin {tyFloat..tyFloat128, tyString} + abstractVarRange-{tyTypeDesc}).kind notin {tyFloat..tyFloat128, tyString, tyCstring} # we generate endings as a set of chained gotos, this is a bit awkward but it # ensures when recursively traversing the CFG for various analysis, we don't -- cgit 1.4.1-2-gfad0