projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1601662
)
fixed: #98
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Sat, 20 Jan 2024 20:06:17 +0000
(14:06 -0600)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Sat, 20 Jan 2024 20:06:17 +0000
(14:06 -0600)
compiler/src/checker.c
patch
|
blob
|
history
diff --git
a/compiler/src/checker.c
b/compiler/src/checker.c
index cb1c56a56d3545fd8dcfb98a0841e99c0ef14dd5..347698b1bd8870b1e337cce7255992514dfb1f75 100644
(file)
--- a/
compiler/src/checker.c
+++ b/
compiler/src/checker.c
@@
-1617,6
+1617,8
@@
CheckStatus check_struct_literal(AstStructLiteral* sl) {
value->token->text, value->token->length, type_get_name(union_type));
}
+ CHECK(expression, &value->value);
+
TYPE_CHECK(&value->value, matched_variant->type) {
ERROR_(value->token->pos,
"Mismatched type in initialized type. Expected something of type '%s', got '%s'.",