Earlier today I updated my setup to the
latest Lazarus release and FPC 3.2.4 branch, and spent a few hours trying to figure out why the sprites in my game were no longer getting sorted properly. The list I was sorting is a generic TObjectList<TSprite>.
Anyway, it turns out that I had to change the definition of the sorting method as follows:
function CompareSprites(constref A, B: TSprite): Integer;- This worked in FPC 3.2.2
- This doesn't actually end up sorting the list in FPC 3.2.4 but doesn't cause an error
function CompareSprites(A, B: TSprite): Integer;- This just freezes in FPC 3.2.2
- This works in FPC 3.2.4
FWIW, using "const" instead of "constref" also freezes in 3.2.2.
I realize 3.2.4 is not even near to a release yet, but have I stumbled upon a bug? Or was the bug in 3.2.2 instead? Or am I just being dense?