blaise/tools/bif-coverage
Andrew Haines 61bb86f896 feat(units): directed lookup for unit-qualified field-access references
A unit-qualified type-member reference written as a field access —
`Unit.TEnum.Member` (a type-qualified enum member) or `Unit.TFoo.StaticVar` —
resolved its base type through the flat uses-chain lookup, i.e. the cross-unit
last-wins winner, ignoring the unit qualifier.  With two used units exporting a
same-named enum/type this bound to the wrong one: `ea.TPalette.paThree` failed
"Enum 'TPalette' has no member 'paThree'" because it resolved TPalette to eb.

TFieldAccessExpr now carries the parser-collapsed unit qualifier (like
TIdentExpr and TMethodCallExpr already do), and AnalyseFieldAccess resolves the
base via the directed ResolveQualified when it is set — so the reference binds
to the named unit's own type, independent of `uses` order.

Also completes the .bif round-trip for the qualifier fields: TFieldAccessExpr
.QualifierUnit and the previously-unserialised TMethodCallExpr.QualifierUnit are
now encoded/decoded, and bif-coverage.status records all the qualifier/owner
fields added across the cross-unit work (serialise vs safe).

Test: e2e cross-unit qualified enum member, order-independent.
2026-06-30 19:39:36 +01:00
..
src/main/pascal feat(lang): static class/record members (within-unit) 2026-06-28 16:11:40 +01:00
bif-coverage.status feat(units): directed lookup for unit-qualified field-access references 2026-06-30 19:39:36 +01:00
project.xml build(bif-coverage): add stdlib unit path so it builds by default 2026-06-29 12:29:55 +01:00