diff --git a/src/main/java/abstractSyntaxTree/Statement/PrintStatement.java b/src/main/java/abstractSyntaxTree/Statement/PrintStatement.java index 8b5a870..96695bb 100644 --- a/src/main/java/abstractSyntaxTree/Statement/PrintStatement.java +++ b/src/main/java/abstractSyntaxTree/Statement/PrintStatement.java @@ -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; }