Alek Ratzloff 9ec12774fd Check type equality when inserting a constant
When the compiler inserts a constant, it will first check to see if that
constant already has been created, so we aren't making millions of the
same constant value - e.g. we can reuse the same integer.

However, the .equals() function on all Object values was returning a
false positive against Ints and Floats that have the same numeric value,
i.e. Float(1.0) == Int(1). If, for example, a float 1.0 was inserted as
a constant, and then an integer 1 was used as a constant later, it was
erroneously retrieving the float 1.0 as an interned pointer value.

This is fixed by checking if the two values' types are equal as well.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2024-09-30 17:33:43 -07:00
2024-09-30 12:48:45 -07:00
2024-09-30 16:33:58 -07:00
2024-09-25 11:42:51 -07:00
Description
No description provided
804 KiB
Languages
Rust 95.5%
Python 4.2%
Shell 0.3%