Compare commits
2 Commits
21ece58cc9
...
cd9fc46a1f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd9fc46a1f | ||
|
|
9b0d8147db |
@@ -40,7 +40,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user