Compiling a multi-unit program whose uses-clause pulls in every runtime unit (the auto-generated bootstrap_program used by 'pasbuild compile -m blaise-runtime') failed in the semantic pass. Several runtime units each privately bind the same C/RTL symbol (e.g. 'external name '_BlaiseGetMem'', 'external name 'abort'') or define a private implementation-section helper of the same name (DiagAbort in both blaise_arc and blaise_exc). In the flat-merge these all share one global scope and overload group, producing spurious 'Duplicate identifier' and 'Ambiguous overload' errors. Three coordinated changes: * SameLinkSymbol/EffectiveLinkName: collapse candidates that denote the same underlying link symbol when at least one side is an external binding — covering both two-units-bind-same-C-symbol and a binding that targets a real function exported by an unmangled RTL unit (blaise_*/rtl.*, whose exports keep their bare Pascal name). SameExternalDecl and the overload-collapse / zero-arity paths now route through it. * BenignDuplicateExternal: when an interface-section Define collides in the global scope, tolerate it if the colliding symbol is the same link symbol. * IsImplOnly flag on TMethodDecl: marks implementation-section-only routines as private to their unit; ResolveStandaloneOverload excludes cross-unit private candidates so each unit's call binds its own helper. Adds three regression tests in cp.test.multifile.pas. All four fixpoints (QBE, native, internal-assembler, warm-cache) and the full suite (3750 tests, QBE-built and native-built runners) pass. |
||
|---|---|---|
| .. | ||
| bif-coverage | ||
| kanban | ||
| migration-analyser | ||
| .gitkeep | ||