How do statically typed programming languages build CFGs for programs containing expression-level control flow (e.g. ternary expressions, match expressions) which require transformation or extra information (i.e. type information, etc.)?
Here’s a concrete example:
let foo = "bar" let k = match foo { "bar" -> 1, _ -> 0, } print(foo, k) My assumption is that the CFG for the whole program is first built and then patched afterwards when enough information becomes available for these kinds of expressions. I am just not sure how correct this is or how well it works in practice for efficiency reasons.