Key helpers for distinct type aliases by their own identity (Fixes #41564)
Summary
The helper key for a record or object was built from the base structure's symbol table, so several distinct aliases of one record (type TA = type TB) shared a single key and lookup returned the helper registered last for any of them.
For a df_unique def build the key from the def's own owner and name; plain aliases keep sharing the structural key. Helper registration in pdecobj duplicated the key computation inline; it now calls generate_objectpascal_helper_key so both sides agree.
Fixes #41564. Test: tests/webtbs/tw41564.pp.
System
- Operating system: all (verified on Windows 11)
- Processor architecture: all (verified on x86-64)
- Device: Computer
What is the current bug behavior?
With helpers declared for TBase, TFirst = type TBase and TSecond = type TBase, First.Marker resolves to the helper of another alias; the test exits with code 1.
What is the behavior after applying this patch?
Each distinct alias resolves to its own helper; a plain alias (TAlias = TBase) keeps the base helper. The test exits 0.
Relevant logs and/or screenshots
Verified on x86_64-win64 main (2efddc1b): red before, green after. Also proposed to Unleashed Pascal as PR #42, which waits for this MR.