UnitGenerator
UnitGenerator copied to clipboard
Null exception on GetHashCode when adding a null string-based unit into a HashSet or as a key of a Dictionary.
It seems a null check is needed here: https://github.com/Cysharp/UnitGenerator/blob/ad84e766a282e070dcd6c5554eed4825abc1ced1/src/UnitGenerator/SourceGenerator.cs#L476
I suggest using something like: return value?.GetHashCode() ?? 0;.
Thank you for the great work!