EnclosingScope falseScope = scope.clone();
if (condition.lhs instanceof Expr.LocalVariable) {
Expr.LocalVariable var = (Expr.LocalVariable) condition.lhs;
Nominal varType = var.result();
Expr.TypeVal typeTest = (Expr.TypeVal) condition.rhs;
<BUG>Nominal trueBranchType = Nominal.intersect(varType, typeTest.type);

Nominal falseBranchType = Nominal.intersect(varType, Nominal.Negation(typeTest.type));
</BUG>
trueScope.createAlias(trueBranchType, var.var, condition.attributes());

EnclosingScope falseScope = scope.clone();
if (condition.lhs instanceof Expr.LocalVariable) {
Expr.LocalVariable var = (Expr.LocalVariable) condition.lhs;
Nominal varType = var.result();
Expr.TypeVal typeTest = (Expr.TypeVal) condition.rhs;
Nominal trueBranchType = Nominal.intersect(varType, typeTest.type, typeSystem);
Nominal falseBranchType = Nominal.intersect(varType, Nominal.Negation(typeTest.type), typeSystem);
trueScope.createAlias(trueBranchType, var.var, condition.attributes());
