bugfix print should return void

This commit is contained in:
Krauß, Josefine 2024-07-01 09:09:23 +02:00
parent 194ff3fcf7
commit 9b0d8147db

View File

@ -27,7 +27,7 @@ public class PrintStatement extends AbstractType implements IStatement {
}
if (!Objects.equals(typeOfVar, "int"))
throw new TypeCheckException("The variable to be printed is " + typeOfVar + " but should be int.");
result.type = typeOfVar;
result.type = "void";
setTypeCheckResult(result);
return result;
}