odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.13k stars 551 forks source link

Fix for bit_set[$T] proc params always being generated as i8 #3842

Closed karl-zylinski closed 6 days ago

karl-zylinski commented 6 days ago

This PR makes types like bit_set[$T] have their upper and lower bits overwritten by upper/lower from the source type when checking if polymorphic type is assignable.

This fixes an issue where an i8 was always generated for bit_sets with generic elements, because it couldn't figure out upper/lower when check_bit_set_type was originally run, so the poly type has both upper and lower 0.

Fixes #2860