diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-02-07 09:17:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-07 09:17:20 +0000 |
| commit | 618941390604b1a8d0d71c23143adb0ec805f906 (patch) | |
| tree | c519ed730582910d8f9f20a4658c59a2fea73c55 /src/check_expr.cpp | |
| parent | 667ddc19076b118f844eff831c9cbe840918208b (diff) | |
| parent | cec84edcdd61e5db8f18c11b2320958f8c752541 (diff) | |
Merge pull request #4790 from odin-lang/bill/sdl3
`vendor:sdl3`
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 83b6181c0..550a7749c 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -3649,7 +3649,8 @@ gb_internal bool check_transmute(CheckerContext *c, Ast *node, Operand *o, Type gb_string_free(oper_str); gb_string_free(to_type); } else if (is_type_integer(src_t) && is_type_integer(dst_t) && - types_have_same_internal_endian(src_t, dst_t)) { + types_have_same_internal_endian(src_t, dst_t) && + type_endian_kind_of(src_t) == type_endian_kind_of(dst_t)) { gbString oper_type = type_to_string(src_t); gbString to_type = type_to_string(dst_t); error(o->expr, "Use of 'transmute' where 'cast' would be preferred since both are integers of the same endianness, from '%s' to '%s'", oper_type, to_type); |