IR: error for uncasted null lit variable

This commit is contained in:
Andrew Kelley
2016-11-19 01:53:14 -05:00
parent 8a81f8aa13
commit 2f8dd46174
4 changed files with 30 additions and 4 deletions

View File

@@ -701,6 +701,11 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
}
break;
}
case NodeTypeNullLiteral:
{
fprintf(ar->f, "null");
break;
}
case NodeTypeFnDecl:
case NodeTypeParamDecl:
case NodeTypeErrorValueDecl:
@@ -709,7 +714,6 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
case NodeTypeStructField:
case NodeTypeStructValueField:
case NodeTypeUse:
case NodeTypeNullLiteral:
case NodeTypeZeroesLiteral:
case NodeTypeIfVarExpr:
case NodeTypeForExpr: