print statement never has a type

This commit is contained in:
2020-01-27 17:02:21 +01:00
parent fa8904e0f5
commit 3fb30ebd7e

View File

@@ -88,7 +88,7 @@ public class ContextAnalysis extends KlangBaseVisitor<Node> {
public Node visitPrint(KlangParser.PrintContext ctx) {
Node expression = this.visit(ctx.expression());
PrintStatement result = new PrintStatement((Expression) expression);
result.type = expression.type;
result.type = null;
return result;
}