aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorFaker-09 <shrybman@teksavvy.com>2026-01-29 11:35:24 -0500
committerGitHub <noreply@github.com>2026-01-29 11:35:24 -0500
commit30ef01ee8d1175dc5a974d8bee62b7ea00651941 (patch)
treecddb56cfe63f3752b8b7a8c314d9cc652f22ec28 /src/check_expr.cpp
parentf6322b4b31fb0a5cc343d4bae31ebc09639e3403 (diff)
parent70059b0fba3099d0d67232ed89c268710f435a36 (diff)
Merge branch 'odin-lang:master' into vet_flags
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 46455aacf..1c09ad908 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -4704,12 +4704,14 @@ gb_internal void convert_to_typed(CheckerContext *c, Operand *operand, Type *tar
switch (t->kind) {
case Type_Basic:
if (operand->mode == Addressing_Constant) {
- check_is_expressible(c, operand, t);
+ check_is_expressible(c, operand, target_type);
if (operand->mode == Addressing_Invalid) {
return;
}
update_untyped_expr_value(c, operand->expr, operand->value);
- } else {
+ }
+
+ {
switch (operand->type->Basic.kind) {
case Basic_UntypedBool:
if (!is_type_boolean(target_type)) {
@@ -12692,8 +12694,10 @@ gb_internal gbString write_expr_to_string(gbString str, Ast *node, bool shorthan
str = write_expr_to_string(str, st->polymorphic_params, shorthand);
str = gb_string_appendc(str, ") ");
}
- if (st->is_packed) str = gb_string_appendc(str, "#packed ");
- if (st->is_raw_union) str = gb_string_appendc(str, "#raw_union ");
+ if (st->is_packed) str = gb_string_appendc(str, "#packed ");
+ if (st->is_raw_union) str = gb_string_appendc(str, "#raw_union ");
+ if (st->is_all_or_none) str = gb_string_appendc(str, "#all_or_none ");
+ if (st->is_simple) str = gb_string_appendc(str, "#simple ");
if (st->align) {
str = gb_string_appendc(str, "#align ");
str = write_expr_to_string(str, st->align, shorthand);