A qualified write to a class-level static var was parsed and visibility-checked but not lowered — semantic reported it as "not yet supported". It now lowers to a plain store of the shared global slot, identical to the bare form a static method writes (StaticVar := V). Semantic marks the TFieldAssignment with IsClassVarWrite + ClassVarEmitName + ClassVarLhsType after enforcing visibility. Both backends delegate to their existing global-store path (EmitAssignment) via a borrowed synthetic TAssignment — the Expr is shared and nilled before the temp is freed — so the scalar, class-ARC, and pointer store logic is reused verbatim rather than duplicated. Verified on both backends: scalar (int/enum/bool/float), class with ARC (assign + nil-release). Adds e2e TestRun_StaticVar_QualifiedWrite_Scalar and _ClassARC (each compiled+run under native and QBE). Two adjacent limitations remain, both pre-existing and independent of this change (documented in bugs.txt): interface-typed static vars mishandle the 2-slot fat-pointer store (the bare form is equally affected), and a chained l-value base through a qualified static var (TFoo.X.field := V) is unresolved in the assignment-receiver path while the read form works. |
||
|---|---|---|
| .. | ||
| bif-coverage | ||
| kanban | ||
| migration-analyser | ||
| .gitkeep | ||