bugfix print should return void
This commit is contained in:
parent
194ff3fcf7
commit
9b0d8147db
@ -27,7 +27,7 @@ public class PrintStatement extends AbstractType implements IStatement {
|
|||||||
}
|
}
|
||||||
if (!Objects.equals(typeOfVar, "int"))
|
if (!Objects.equals(typeOfVar, "int"))
|
||||||
throw new TypeCheckException("The variable to be printed is " + typeOfVar + " but should be int.");
|
throw new TypeCheckException("The variable to be printed is " + typeOfVar + " but should be int.");
|
||||||
result.type = typeOfVar;
|
result.type = "void";
|
||||||
setTypeCheckResult(result);
|
setTypeCheckResult(result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user