Type checker checks the condition before every branch in "when" statements, and sets the "True" flag if it evaluated to true.
Then the code generator just skips over branches that don't have the "True" flag set: https://github.com/vrok/have/blob/master/have/generator.go#L...