We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32f16d8 commit aef9445Copy full SHA for aef9445
src/control-flow/cfg-python.ts
@@ -409,8 +409,12 @@ export class CFGBuilder {
409
this.addEdge(patternNode, consequenceBlock.entry, "consequence");
410
if (consequenceBlock?.exit)
411
this.addEdge(consequenceBlock.exit, mergeNode, "regular");
412
- if (previous) this.addEdge(previous, patternNode, "alternative");
413
- previous = patternNode;
+ if (this.flatSwitch) {
+ this.addEdge(previous, patternNode, "regular");
414
+ } else {
415
+ if (previous) this.addEdge(previous, patternNode, "alternative");
416
+ previous = patternNode;
417
+ }
418
}
419
420
return blockHandler.update({ entry: subjectBlock.entry, exit: mergeNode });
0 commit comments