blaise/tools
Graeme Geldenhuys b0f92f0d3c fix(semantic): tolerate cross-unit duplicate external bindings + private impl procs in flat-merge
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.
2026-06-24 15:59:30 +01:00
..
bif-coverage fix(semantic): tolerate cross-unit duplicate external bindings + private impl procs in flat-merge 2026-06-24 15:59:30 +01:00
kanban Modernise stdlib testing + tools: TList<String> over TStringList, drop .Free 2026-06-23 19:21:09 +01:00
migration-analyser fix: we don't have any code for migration-analyser yet. Disable tests for it. 2026-05-08 00:52:44 +01:00
.gitkeep Initial project scaffold 2026-04-20 14:22:10 +01:00