Skip to content

Commit

Permalink
Fix issue with overloaded *= etc
Browse files Browse the repository at this point in the history
lerno committed Dec 11, 2024
1 parent 369a455 commit 723e1dd
Showing 6 changed files with 259 additions and 184 deletions.
2 changes: 1 addition & 1 deletion releasenotes.md
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
- Support &a[0] returning the distinct type when applying it to a distinct of a pointer.
- Fix error when calling `HashMap.remove` on uninitialized `HashMap`.
- Fix issue with resolved try-unwrap in defer.
- Fix issue with overloaded subscript and ++/--.
- Fix issue with overloaded subscript and ++/-- and assign ops (e.g. `*=`)
- Fix issue with properties in different targets not being respected #1633.
- Indexing an Optional slice would crash in codegen #1636.
- SimpleHeapAllocator bug when splitting blocks allowed memory overrun.
2 changes: 1 addition & 1 deletion src/compiler/compiler_internal.h
Original file line number Diff line number Diff line change
@@ -3072,7 +3072,7 @@ INLINE bool type_underlying_is_numeric(Type *type)
INLINE bool type_underlying_may_add_sub(Type *type)
{
type = type_flatten(type);
return type->type_kind == TYPE_ENUM || type_is_numeric(type_flatten(type));
return type->type_kind == TYPE_ENUM || type->type_kind == TYPE_POINTER || type_is_numeric(type_flatten(type));
}

INLINE bool type_flat_is_vector(Type *type)
Loading

0 comments on commit 723e1dd

Please sign in to comment.