Fix missing constraints

This commit is contained in:
Daniel Holle 2023-08-17 16:15:38 +02:00
parent ee359da751
commit 011b272af6

View File

@ -753,14 +753,16 @@ public class TYPEStmt implements StatementVisitor {
constraintsSet.addUndConstraint(new Pair(label.getPattern().getType(), switchStmt.getSwitch().getType(), PairOperator.SMALLERDOT));
}
}
child.accept(this);
constraintsSet.addUndConstraint(new Pair(child.getType(), switchStmt.getType(), PairOperator.SMALLERDOT));
}
} else {
constraintsSet.addUndConstraint(new Pair(caseExpressionType, switchStmt.getSwitch().getType(), PairOperator.EQUALSDOT));
}
for (var child : switchStmt.getBlocks()) {
child.accept(this);
constraintsSet.addUndConstraint(new Pair(child.getType(), switchStmt.getType(), PairOperator.SMALLERDOT));
}
switchStack.pop();
}