diff --git a/compiler/dfa.nim b/compiler/dfa.nim index 517d138317..c7a9d46944 100644 --- a/compiler/dfa.nim +++ b/compiler/dfa.nim @@ -455,6 +455,10 @@ proc genCase(c: var Con; n: PNode) = let isExhaustive = skipTypes(n[0].typ, abstractVarRange-{tyTypeDesc}).kind notin {tyFloat..tyFloat128, tyString} + # 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 + # artificially extended the life of each branch (for the purposes of DFA) + # beyond the minimum amount. var endings: seq[TPosition] = @[] c.gen(n[0]) for i in 1..