feat: add Constraint for Default-Case

This commit is contained in:
Ruben 2024-09-20 18:02:13 +02:00
parent a9d836ce25
commit 406f98e55d

View File

@ -861,7 +861,8 @@ public class TYPEStmt implements StatementVisitor {
for (var child : switchStmt.getBlocks()) {
for (var label : child.getLabels()) {
if (label.getPattern() == null) {
System.out.println("DefaultCase");
System.out.println("Default-Case");
constraintsSet.addUndConstraint(new Pair(new RefType(new JavaClassName("java.lang.Object"), new NullToken()), switchStmt.getSwitch().getType(), PairOperator.SMALLERDOT, loc(label.getOffset())));
}
if (label.getPattern() instanceof RecordPattern) {
RecordPattern recordPattern = (RecordPattern) label.getPattern();