You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P2] Compiler: local declaration heritage reads require a nonexistent class-expression owner #2873
A local class declaration used as a superclass is mistaken for an immutable named class-expression self binding during compilation. The exact unchanged evaluated-definition case in MultilevelClassExpressionHeritageTests.Cases is accepted by strict TypeScript and the SharpTS checker, but standalone compilation stops with an internal ownership error.
Expected, observed under Node after full-strict TypeScript acceptance:
43 44 true true
true true false true
The immutable current-parent CLI accepts --no-tsconfig --strict --noLib --noEmit with exit 0 and empty output. The next bounded --no-tsconfig --strict --noLib --compile ... --standalone --verify call exits 1, prints no stdout, and reports:
Error: Private name has no class evaluation owner.
The process closes normally with both pipes drained and no timeout. Compilation does not reach a full-IL success result; no PE metadata inspection or saved guest execution is claimed. The same full program fails in the current shared single-source compiled, shared module compiled, and isolated saved-compilation profiles. Interpreted preservation rows remain green.
The independent parent uses SharpTS.dll SHA256 C83ADFD48CC7FEB6BDB1E6914CAFB43C699CF534582F649F3103B1306852DDBF, pin B8CE21DC7C7551A2BE2E48D9942CE6FB5A9CE23738B0E81CFE8347352FA4BE9A, with its complete 20-file package. The retained pin's historical base is bf5daddf57d2826f616b0ffbcad7378f010104af; source-equivalence checks bind that package to committed parent a2399315117bf55fa5dd0f9fb9a3253436a3d761. The working tree held the known failed #2809 overlay during this independent pinned-parent call; it is explicitly not described as a clean tracked tree. This establishes a prerequisite independent of the new #2809 change, with no introducing-commit claim.
Static trace: CreateRuntimeClassExpression reuses a declaration's original name token for its synthetic expression adapter. LoopBodyCellAnalyzer also records expression self owners by that token. A later heritage read of the outer declaration binding can therefore be classified as an inner class self. TryEmitClassDefinitionSelf then requests an evaluated owner while emitting the ordinary factory's heritage expression, where no such enclosing owner exists. This is a source diagnosis, not a proposed general private-name transport change.
Fresh all-state searches without a label filter found no focused existing owner. Open #2452 concerns carrying a genuine immutable named-expression self through an ordinary function nested inside a class method; its primary explicitly has no superclass. Here the affected read is the ordinary declaration binding in an extends expression, with no intervening ordinary function inside a class member. Closed #2096 and #2049 own repeated declaration identity and transitive initialization respectively, not this compile-time name classification. Closed #2208/#2038/#2010 and open #2253/#2332 cover different named-self, lexical shadow, private-name, capture-forwarding, or module-header boundaries.
Acceptance: preserve the outer declaration binding when it is evaluated as a superclass, while retaining the legitimate named-expression self in read(), captured tag values, fresh per-call constructor/prototype identity, and both full expected lines. Keep the full single-source/module/saved preservation case and related owner tests intact; do not work around the error with a mode exclusion or by replacing the program.
Evidence under artifacts/p2-goal/2809-evaluated-definition-*: exact 514-byte CRLF/no-final-newline source SHA256 53AC61E827FE6A3DCD324649A57E4B6DE742F81ADA7D284FFAA0D1CF8F34CF01; qualified reference result 832644C24DCA6E20E9BE397EFC1E6079DED95B66C5544FF8DF029FD73C316DD2; parent check/compile-only result 5198A2A5764515398943EA6343650B19F7819DF788AFEFB9A87E207955924B91; source trace, full issue bodies/comments, and nine complete targeted search responses. No public mutation or implementation is part of this report draft.
Activity