← board

member visibility is not enforced (private/protected/strict readable+writable from anywhere)

State

pxx parses all visibility markers (private, protected, public, published, strict private, strict protected) but enforces none of them — the class/record parsers say so in comments ("access is not enforced, project policy"). Only published has an effect (RTTI). tclass12b (strict private const reached from a DESCENDANT class) is the conformance reminder test; it is skip-listed as accepts-invalid pointing here.

Direction (user, 2026-07-15 morning): FULL ROUTE — DESIGN NOTE ONLY, NOT STARTED

Per the user: no cheat-first strict-only slice — implement the real, unit-scoped semantics from the start (plain private is the one that matters in practice, because of name conflicts). This is Track P, a compiler change with real prio — but the user has NOT authorized starting; this section is captured design direction only. Per-feature switch --strict-visibility / {$STRICT_VISIBILITY ON}, DEFAULT OFF (the lax dialect keeps its ergonomics — the locked-hierarchy annoyance is deliberate design here). Promotion into --mimic-fpc only after the flag stays green ON across the FPC-valid corpora (fgl, Synapse, fpjson, conformance pass set) — those compile under real FPC, so any rejection = our semantics bug; a mechanical criterion, and faithful semantics preserve the community's workarounds (same-unit access, the cracker cast).

Recon: the tagging mechanism already exists (user was right)

If/when enforced, get the scoping right

Progress (2026-07-15, agent-A — FIELD visibility landed behind the flag)

Landed (commit 23fd7574): the real, FPC-faithful, unit-scoped model behind --strict-visibility / {$STRICT_VISIBILITY ON}, default OFF — self-host byte-identical (the lax path runs no extra lookup).

Remaining before full resolution / --mimic-fpc promotion

  1. Method-call enforcement — same helper + MethDeclClass/UMthVis, wired at the obj.method() and bare-Self call sites (numerous; each needs the same false-positive sweep the field wiring got). MethDeclClass helper already added.
  2. Class-const scoping — tclass12b's EXACT case is a strict private const, which pxx models as a GLOBAL (class consts are not scoped members here), so it is not yet caught. Needs class-const scoping, a separate mechanism.
  3. Full FPC-corpus validation — compile fgl / Synapse / fpjson / the conformance pass-set with the flag ON; any rejection of that valid code is a semantics bug to fix before promoting into --mimic-fpc.

Log

Resolution (2026-07-15, agent-ACP — commit df41ab5e)

Items 1 and 3 of the remaining list landed; item 2 split out.

  1. Method-call enforcement — EnforceMethVis wired at all committed dispatch sites (never on probes). Negative tests: external private call, descendant strict-private (test_method_visibility_strict_fail); positives extended in test_member_visibility (private/protected methods, property-over-protected).
  2. Property-backed field exemption — a public property over a private field was false-positived at the property expansion site (TList.Count and 4 more Classes tests); the backing-field access is now exempt (viaProp), matching FPC (the check belongs to the property, which pxx parses in-section).
  3. Corpus validation + PROMOTION — flag ON: test/ sweep 745 files clean, conformance pass-set 328/328, fpjson 203/203 (binary identical), Synapse identical output, real-FPC fgl green. --mimic-fpc now sets StrictVisibility. Residual (class-CONST scoping, tclass12b's exact case) → [[bug-pascal-class-const-visibility]] (prio 20, compat).