Skip to content

semantic+codegen: a const/static member read through an instance receiver is CS0176 behind SPY0908 #2147

Open

Description

@antonsynd

Class

A static or constant member reached through an instance receiver must either lower to type-qualified access or be refused by the checker with a real diagnostic. Today the checker accepts it and the emitter writes instance access, so C# refuses it (SPY0908 CS0176) @ 05824d5. The spec (statements.md "Class-Level Constants") says m.PI "works but discouraged". #1794 was the struct-field twin (closed).

Cells

axis values program observed @ 05824d5 expected lane reach found by
class const × instance receiver class Math: / const PI: float = 3.14 + m = Math() / print(m.PI) clean under emit diagnostics; run → SPY0908 CS0176 "Member 'Math.PI' cannot be accessed with an instance reference" prints 3.14 (spec) ice program P21a Phase 0 spec drain

Acceptance

  • Matrix: member kind {const, static field, static method, static property} × receiver {instance local, self, call result} × host {class, struct}, executed under run.

Labels: class-tracker, lane:ice, reach:program.

Found during plan-2003b4 (P21a) Phase 0.

Activity

  1. added
    lane:iceInternal compiler error: SPY0908/SPY0909, a CSxxxx leak, a crash
    reach:programAn ordinary program a Python programmer would write hits it
    class-trackerThe one issue per class: carries the contract and the cell table
    on Sep 29, 2026
  2. antonsynd commented on Sep 30, 2026

    @antonsynd
    OwnerAuthor

    Batching 2026-09-30 @ db8e05b — charter .claude/plans/remediation-round-2026-09-20-batching.md §3.25, P30 — member-shape/self/static totality (order N19; generator FIRST).

    Contract: ONE member-shape table {static-ness, self presence, accessor kind, default body, host kind} — MemberClassification — is read by the checker, every validator and the emitter, so a static member reached through an instance, a self-less @static interface method, a lambda parameter named self, an interface default accessor body, or a setter parameter annotation is decided in Semantic and emitted from that decision, never refused by Roslyn. Generator FIRST: an emit-and-Roslyn-compile sweep over host × member kind × body × receiver × self position (the ILCompiles harness shape), allowlist ratchet. This cell: a const/static member reached through an instance receiver lowers to type-qualified access from the recorded member kind (statements.md: "works but discouraged"); matrix member kind {const, static field, static method, static property} × receiver {instance local, self, call result} × host {class, struct}, under run. Lane / reach: ice · program. Class tracker: #2051. No seam hypothesis — the plan measures the seam.

  3. antonsynd commented on Oct 29, 2026

    @antonsynd
    OwnerAuthor

    Cell: a @static PROPERTY read through an instance receiver (found by P21h's re-verify)

    This is the property-kind sibling of this issue's const/static-field cells: member access through an instance doesn't check a property's staticness, so the generated C# hits CS0176.

    class C:
        @static
        property get a: int = 1
    
    def main():
        print(C().a)
    result
    sharpyc run @ 9aae969 (measured) SPY0908 CS0176
    sharpyc run @ 735d84d (P21h, measured) SPY0908 CS0176
    expected a Sharpy refusal naming the static member (as this issue's contract asks for a static field or const), or reading C.a

    It is pre-existing and P21h doesn't change it.

  4. antonsynd commented on Nov 5, 2026

    @antonsynd
    OwnerAuthor

    CS0176 through an instance receiver: 96 allowlist row(s) drain with this issue.

    Measured by the name-resolution differential harness (P77a, #2421) @ 5f8a4c4e2. Each row is a generated cell in src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt. The rows pin the verdict class: a fix turns them green, the ratchet then reports them STALE, and they are deleted with the fix.

    family class rule code rows
    Read Ice N7 SPY0908, CS0176 96

    These are the self.x cells from every self-bearing body (method, __init__, accessor get and set, nested def and lambda in a method, nested class method): the receiver self column of this issue's matrix, over const, @static property and @static method. Inherited receivers are in the declaring-type cells.

    All 96 rows
    read/ClassComputedConst/AccessorGetBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/AccessorGetBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/AccessorSetBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/AccessorSetBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/ComprehensionElement/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/ComprehensionElement/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/ComprehensionIterable/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/ComprehensionIterable/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/GeneratorBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/GeneratorBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/InitBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/InitBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/InitBody/base/self.x Ice
    read/ClassComputedConst/LambdaImmediate/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaImmediate/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaPassed/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaPassed/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaStored/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaStored/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/MethodBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/MethodBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/MethodBody/base/self.x Ice
    read/ClassComputedConst/NestedDefInMethod/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/NestedDefInMethod/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/AccessorGetBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/AccessorGetBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/AccessorSetBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/AccessorSetBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/ComprehensionElement/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/ComprehensionElement/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/ComprehensionIterable/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/ComprehensionIterable/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/GeneratorBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/GeneratorBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/InitBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/InitBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/InitBody/base/self.x Ice
    read/ClassLiteralConst/LambdaImmediate/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaImmediate/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaPassed/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaPassed/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaStored/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaStored/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/MethodBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/MethodBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/MethodBody/base/self.x Ice
    read/ClassLiteralConst/NestedDefInMethod/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/NestedDefInMethod/Later/SelfDot/outer=None Ice
    read/StaticMethod/AccessorGetBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/AccessorGetBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/AccessorSetBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/AccessorSetBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/ComprehensionElement/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/ComprehensionElement/Later/SelfDot/outer=None Ice
    read/StaticMethod/ComprehensionIterable/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/ComprehensionIterable/Later/SelfDot/outer=None Ice
    read/StaticMethod/GeneratorBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/GeneratorBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/InitBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/InitBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/InitBody/base/self.x Ice
    read/StaticMethod/LambdaImmediate/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/LambdaImmediate/Later/SelfDot/outer=None Ice
    read/StaticMethod/LambdaPassed/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/LambdaPassed/Later/SelfDot/outer=None Ice
    read/StaticMethod/LambdaStored/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/LambdaStored/Later/SelfDot/outer=None Ice
    read/StaticMethod/MethodBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/MethodBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/MethodBody/base/self.x Ice
    read/StaticMethod/NestedDefInMethod/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/NestedDefInMethod/Later/SelfDot/outer=None Ice
    read/StaticProperty/AccessorGetBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/AccessorGetBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/AccessorSetBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/AccessorSetBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/ComprehensionElement/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/ComprehensionElement/Later/SelfDot/outer=None Ice
    read/StaticProperty/ComprehensionIterable/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/ComprehensionIterable/Later/SelfDot/outer=None Ice
    read/StaticProperty/GeneratorBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/GeneratorBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/InitBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/InitBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/InitBody/base/self.x Ice
    read/StaticProperty/LambdaImmediate/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/LambdaImmediate/Later/SelfDot/outer=None Ice
    read/StaticProperty/LambdaPassed/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/LambdaPassed/Later/SelfDot/outer=None Ice
    read/StaticProperty/LambdaStored/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/LambdaStored/Later/SelfDot/outer=None Ice
    read/StaticProperty/MethodBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/MethodBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/MethodBody/base/self.x Ice
    read/StaticProperty/NestedDefInMethod/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/NestedDefInMethod/Later/SelfDot/outer=None Ice
    

    5f8a4c4e2 and the allowlist file are on local dev until the next push.

  5. antonsynd commented on Nov 6, 2026

    @antonsynd
    OwnerAuthor

    Drain set after P77b (name-resolution differential, branch remote/p77b-implement-plan @ 0c0bdcf)

    110 rows of src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt cite this issue (96 at the plan base 2279c0d), all read Ice. The P77b axes generated the new cells, and each was re-ratcheted by direction. When the cure lands, every one of these rows must drain: a stale row fails the sweep.

    New route in H4 (55e7c8f, axis 7): CS1673 at a StaticMethod position.

    To list them: grep -n '# #2147' src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt


    Generated by Claude Code

  6. antonsynd commented on Nov 7, 2026

    @antonsynd
    OwnerAuthor

    Drain set @ 87ac3853e (P77b, PR #2453 merged into dev): 128 allowlist row(s) cite this issue.

    Measured from src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt @ 87ac3853e (origin/dev; the name-resolution differential harness, pool 8889, allowlist 2595 rows, 19 cited issues). Each row is a generated cell that pins its verdict class: the fix for this issue turns the cell green, the ratchet then reports the row STALE, and the row is deleted with the fix. This comment supersedes the P77a drain-set comment of 2026-11-05 on this issue (where one exists) and any drain-set comment from the reverted first P77b attempt; the counts here are the merged ones. Family is the first segment of the cell id; the lane is the row's own.

    family class lane rows
    read Ice ice 128
    All 128 row(s)
    read/ClassComputedConst/AccessorGetBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/AccessorGetBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/AccessorSetBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/AccessorSetBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/ComprehensionElement/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/ComprehensionElement/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/ComprehensionIterable/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/ComprehensionIterable/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/GeneratorBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/GeneratorBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/InitBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/InitBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/InitBody/base/self.x Ice
    read/ClassComputedConst/LambdaImmediate/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaImmediate/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaPassed/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaPassed/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaStored/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/LambdaStored/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/MethodBody/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/MethodBody/Later/SelfDot/outer=None Ice
    read/ClassComputedConst/MethodBody/base/self.x Ice
    read/ClassComputedConst/NestedDefInMethod/Earlier/SelfDot/outer=None Ice
    read/ClassComputedConst/NestedDefInMethod/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/AccessorGetBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/AccessorGetBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/AccessorSetBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/AccessorSetBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/ComprehensionElement/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/ComprehensionElement/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/ComprehensionIterable/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/ComprehensionIterable/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/GeneratorBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/GeneratorBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/InitBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/InitBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/InitBody/base/self.x Ice
    read/ClassLiteralConst/LambdaImmediate/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaImmediate/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaPassed/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaPassed/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaStored/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/LambdaStored/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/MethodBody/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/MethodBody/Later/SelfDot/outer=None Ice
    read/ClassLiteralConst/MethodBody/base/self.x Ice
    read/ClassLiteralConst/NestedDefInMethod/Earlier/SelfDot/outer=None Ice
    read/ClassLiteralConst/NestedDefInMethod/Later/SelfDot/outer=None Ice
    read/StaticMethod/AccessorGetBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/AccessorGetBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/AccessorSetBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/AccessorSetBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/ComprehensionElement/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/ComprehensionElement/Later/SelfDot/outer=None Ice
    read/StaticMethod/ComprehensionIterable/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/ComprehensionIterable/Later/SelfDot/outer=None Ice
    read/StaticMethod/GeneratorBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/GeneratorBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/InitBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/InitBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/InitBody/base/self.x Ice
    read/StaticMethod/LambdaImmediate/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/LambdaImmediate/Later/SelfDot/outer=None Ice
    read/StaticMethod/LambdaPassed/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/LambdaPassed/Later/SelfDot/outer=None Ice
    read/StaticMethod/LambdaStored/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/LambdaStored/Later/SelfDot/outer=None Ice
    read/StaticMethod/MethodBody/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/MethodBody/Later/SelfDot/outer=None Ice
    read/StaticMethod/MethodBody/base/self.x Ice
    read/StaticMethod/NestedDefInMethod/Earlier/SelfDot/outer=None Ice
    read/StaticMethod/NestedDefInMethod/Later/SelfDot/outer=None Ice
    read/StaticProperty/AccessorGetBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/AccessorGetBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/AccessorSetBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/AccessorSetBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/ComprehensionElement/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/ComprehensionElement/Later/SelfDot/outer=None Ice
    read/StaticProperty/ComprehensionIterable/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/ComprehensionIterable/Later/SelfDot/outer=None Ice
    read/StaticProperty/GeneratorBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/GeneratorBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/InitBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/InitBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/InitBody/base/self.x Ice
    read/StaticProperty/LambdaImmediate/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/LambdaImmediate/Later/SelfDot/outer=None Ice
    read/StaticProperty/LambdaPassed/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/LambdaPassed/Later/SelfDot/outer=None Ice
    read/StaticProperty/LambdaStored/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/LambdaStored/Later/SelfDot/outer=None Ice
    read/StaticProperty/MethodBody/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/MethodBody/Later/SelfDot/outer=None Ice
    read/StaticProperty/MethodBody/base/self.x Ice
    read/StaticProperty/NestedDefInMethod/Earlier/SelfDot/outer=None Ice
    read/StaticProperty/NestedDefInMethod/Later/SelfDot/outer=None Ice
    read/cycle/SelfDot/ModuleType/ThroughDef/ModuleComputedConst/ClassComputedConst Ice
    read/cycle/SelfDot/ModuleType/ThroughDef/ModuleComputedConst/StaticProperty Ice
    read/cycle/SelfDot/ModuleType/ThroughDef/ModuleProperty/ClassComputedConst Ice
    read/cycle/SelfDot/ModuleType/ThroughDef/ModuleProperty/StaticProperty Ice
    read/cycle/SelfDot/ModuleType/ThroughDef/ModuleVar/ClassComputedConst Ice
    read/cycle/SelfDot/ModuleType/ThroughDef/ModuleVar/StaticProperty Ice
    read/cycle/SelfDot/SelfThroughDef/ThroughDef/ClassComputedConst/ClassComputedConst Ice
    read/cycle/SelfDot/SelfThroughDef/ThroughDef/StaticProperty/StaticProperty Ice
    read/cycle/SelfDot/TypeModule/ThroughDef/ClassComputedConst/ModuleComputedConst Ice
    read/cycle/SelfDot/TypeModule/ThroughDef/ClassComputedConst/ModuleProperty Ice
    read/cycle/SelfDot/TypeModule/ThroughDef/StaticProperty/ModuleComputedConst Ice
    read/cycle/SelfDot/TypeModule/ThroughDef/StaticProperty/ModuleProperty Ice
    read/cycle/SelfDot/TypeOtherType/ThroughDef/ClassComputedConst/ClassComputedConst Ice
    read/cycle/SelfDot/TypeOtherType/ThroughDef/ClassComputedConst/StaticProperty Ice
    read/cycle/SelfDot/TypeOtherType/ThroughDef/StaticField/ClassComputedConst Ice
    read/cycle/SelfDot/TypeOtherType/ThroughDef/StaticField/StaticProperty Ice
    read/cycle/SelfDot/TypeOtherType/ThroughDef/StaticProperty/ClassComputedConst Ice
    read/cycle/SelfDot/TypeOtherType/ThroughDef/StaticProperty/StaticProperty Ice
    read/struct/StaticMethod/AccessorGetBody/Earlier/SelfDot Ice
    read/struct/StaticMethod/AccessorGetBody/Lambda/Earlier/SelfDot Ice
    read/struct/StaticMethod/AccessorSetBody/Earlier/SelfDot Ice
    read/struct/StaticMethod/ComprehensionElement/Earlier/SelfDot Ice
    read/struct/StaticMethod/ComprehensionIterable/Earlier/SelfDot Ice
    read/struct/StaticMethod/GeneratorBody/Earlier/SelfDot Ice
    read/struct/StaticMethod/InitBody/Earlier/SelfDot Ice
    read/struct/StaticMethod/InitBody/Lambda/Earlier/SelfDot Ice
    read/struct/StaticMethod/LambdaImmediate/Earlier/SelfDot Ice
    read/struct/StaticMethod/LambdaPassed/Earlier/SelfDot Ice
    read/struct/StaticMethod/LambdaStored/Earlier/SelfDot Ice
    read/struct/StaticMethod/MethodBody/Earlier/SelfDot Ice
    read/struct/StaticMethod/MethodBody/Later/SelfDot Ice
    read/struct/StaticMethod/NestedDefInMethod/Earlier/SelfDot Ice
    

    Generated by Claude Code

  7. antonsynd commented on Nov 8, 2026

    @antonsynd
    OwnerAuthor

    Cell (receiver × member-kind matrix, property write side) — measured @ b5bd254 with sharpyc run, python 3.13.18; found while verifying P85 (plan-5cfc2b, #2439).

    A collection augmented store through a property with a custom setter never runs the setter:

    class Box:
        _xs: list[int] = [1, 2]
        sets: int = 0
        property get xs -> list[int]: return self._xs
        property set xs(v: list[int]): self._xs = v; self.sets += 1
        def m(self) -> None:
            self.xs += [3]          # python: xs = xs.__iadd__([3]) — the setter runs
    Sharpy python
    list after m(), setter calls [2, 3] 1 (after init) [1, 2, 3] 2

    IrCollectionMutation calls the getter and Extend and skips the setter, at every statement position (so it is not P85's class, whose contract is position uniformity). Observable only with a side-effecting setter; the printed count is a COMPARED surface. Axis 8 has no collection × InstanceProperty cell, and P85's generator keeps the collection family off property targets, so this cell is this matrix's: member kind {property with setter} × operator family {collection}. lane:silent-wrong · reach:program.


    Generated by Claude Code

  8. antonsynd commented on Nov 18, 2026

    @antonsynd
    OwnerAuthor

    More cells of this class: a static PROPERTY or static METHOD used through an instance. Measured on dev @ 20909f7 and on PR #2742 @ f792078, with the same result on both (independent review of #2742).

    Program Observed Expected
    class D: @static property s: int = 5 / print(D().s) SPY0908 (CS0176 'D.S' cannot be accessed with an instance reference) 5
    class D: @static def m() -> int: return 6 / print(D().m()) SPY0908 (CS0176) 6
    class C: @static s: int = 1 / class D(C): @static property s: int = 5 / print(D().s) dev: 1 (silently wrong: the base's field wins over D's own property); #2742: CS0176 behind SPY0908 5 (CPython 3.15 MRO)

    The instance route rewrites a static FIELD read to D.S (with SPY0459), but not a static property or method. The third row was a silently wrong value on dev. #2742's first-declaration binding makes it a compile error, and this issue's fix makes it run.

    lane:ice · reach:program


    Generated by Claude Code

  9. antonsynd commented on Nov 19, 2026

    @antonsynd
    OwnerAuthor

    Cell from P77 (#2742) review 6: a generic class's @static read through an instance. Measured with the built binary at dev 20909f7 and the #2742 tip 9e39086.

    class G[T]: / @static / s: int = 5 / def main() -> None: / print(G[int]().s): SPY0908 CS0305 Using the generic type 'G<T>' requires 1 type arguments, the same at both. Expected 5. The instance route records the open generic as the owner, so the emitter spells G.S. The same happens through a closed subclass: class M[T](C): @static s: int = 5 / class L(M[int]) / L().s.

    This is the generic-owner spelling of this issue's instance-receiver read. Its store twin (self.s inside a generic) is on #2435 (comment 6994934758). StaticValueRedeclarationTests on #2742 excludes the cell GenericIntermediateBase × Field × InstanceRead, citing #2435.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    class-trackerThe one issue per class: carries the contract and the cell tablelane:iceInternal compiler error: SPY0908/SPY0909, a CSxxxx leak, a crashreach:programAn ordinary program a Python programmer would write hits it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions