Defer the VMT of a partial specialization (Fixes #41788)
Summary
A specialization whose arguments still contain parameters of the enclosing generic has no generated method bodies. Phase 2 already kept such a def out of the pending specializations, but ncgvmt still emitted a VMT with references to the missing bodies, so linking failed with an undefined symbol.
Move the unresolved-parameters check to tstoreddef.has_generic_paras and use it in ncgvmt as well. The VMT layout is still built to validate overrides in partial descendants; concrete specializations are unchanged.
Fixes #41788. Test: tests/webtbs/tw41788.pp.
System
- Operating system: all (verified on Windows 11)
- Processor architecture: all (verified on x86-64)
- Device: Computer
What is the current bug behavior?
tw41788.pp(63,1) Error: Undefined symbol: P$TW41788$_$TENUMERATOR$1$CRCC1EFDE19_CRC59F25C67_$__$$_DOMOVENEXT$$BOOLEAN (first seen in tw41788.o)What is the behavior after applying this patch?
Links and runs (exit 0); the partial specialization emits no VMT until it is concretely specialized.
Relevant logs and/or screenshots
Verified on x86_64-win64 main (2efddc1b): red before, green after. Also proposed to Unleashed Pascal as PR #51, which waits for this MR.