aboutsummaryrefslogtreecommitdiff
path: root/src/checker/expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/checker/expr.cpp')
-rw-r--r--src/checker/expr.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/checker/expr.cpp b/src/checker/expr.cpp
index 44fe990f0..d8e1ac908 100644
--- a/src/checker/expr.cpp
+++ b/src/checker/expr.cpp
@@ -3677,7 +3677,7 @@ ExprKind check__expr_base(Checker *c, Operand *o, AstNode *node, Type *type_hint
default: {
gbString str = type_to_string(type);
- error(ast_node_token(node), "Invalid or unyet supported compound literal type `%s`", str);
+ error(ast_node_token(node), "Invalid compound literal type `%s`", str);
gb_string_free(str);
goto error;
} break;
@@ -4187,6 +4187,11 @@ gbString write_expr_to_string(gbString str, AstNode *node) {
str = write_expr_to_string(str, pt->type);
case_end;
+ case_ast_node(mt, MaybeType, node);
+ str = gb_string_appendc(str, "?");
+ str = write_expr_to_string(str, mt->type);
+ case_end;
+
case_ast_node(at, ArrayType, node);
str = gb_string_appendc(str, "[");
str = write_expr_to_string(str, at->count);