Skip to content

codegen: a nested type constructed by its bare name inside the enclosing type (N()) is emitted as a member invocation — CS1955 behind SPY0908 #2397

Open

Description

@antonsynd

Contract: a nested type's name read bare inside its enclosing type's body denotes the TYPE in every position. A call N() constructs it (new N()), exactly as C.N() does from outside.

class C:
    class N:
        tag: int = 3
    def m(self) -> int:
        return N().tag

def main():
    print(C().m())

run @ 9aae969 (and @ 35783f9): SPY0908 CS1955 "Non-invocable member 'C.N' cannot be used like a method". The call is emitted as an invocation of the member N, not as new N(). Expected: 3.

position of the bare N() observed @ 9aae969 found by
method body SPY0908 CS1955 P21h verify round, <scratchpad>/probes
instance field initializer (b: int = N().tag) SPY0908 CS1955 P21h verify round
parameter default SPY0401 (not a constant; the refusal is correct there) same

The cells agree across every position, so the defect is on the callee-kind axis (a nested type as a bare callee from the enclosing body), not P21h's read-position axis. Related but different: #1894 (bare nested-type reference in a GENERIC host drops the type arguments, CS0305).

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 Oct 29, 2026
  2. antonsynd commented on Oct 30, 2026

    @antonsynd
    OwnerAuthor

    Batching 2026-10-29 @ 04f9138 — charter .claude/plans/remediation-round-2026-09-20-batching.md §3.33, P16 — type-denoting reference totality (row 33; full (c); placed by class under R-JW, no ruling of its own).

    Contract (P16's): every spelling of a type reference reaches the same verdict in every position — the callee-kind axis gains nested type, bare, from the enclosing body beside #1894's generic-host cells (one carrier). Measured at batching (built sharpyc, the 04f9138 tree, lock-free): bare N().tag in the enclosing method → SPY0908 CS1955 (this issue's cell); the controls C.N().tag and n: C.N = C.N() print 3 3 — the Python-habit spelling runs (Python's class scope is invisible in methods, so Python code writes C.N()); the failing spelling is C#'s habit, which is why the cell waits for P16's carrier rather than a chore. The cells agree across read positions, so the axis is callee kind, not P21h's read position (the issue's own axis change). Lane ice · reach program. This issue is the tracker for the callee cell; #1894 keeps the generic-host cells.

  3. antonsynd commented on Nov 5, 2026

    @antonsynd
    OwnerAuthor

    Cells from P77a's name-resolution harness. 27 allowlist rows now cite this issue: a bare nested type read inside its enclosing type, SPY0908 CS1061 / CS0149 / CS0266 at member, method, comprehension and lambda positions (read/NestedType/*). They carried the harness's default route before; the verify round routed them here by contract. Whether this issue's fix drains every one is unproven until it lands, and a row that moves is red.

    A sibling the harness does not generate, re-run @ 5f8a4c4e2:

    ~ is a newline.

    cell Sharpy @ 5f8a4c4e2 python
    nest_sibling_earlier_none SPY0908 CS1955 raises NameError
    Programs

    nest_sibling_earlier_none

    class H:
        class J:
            b: int = 2
        class I:
            @static
            a: int = J().b
    def main() -> None:
        print(H.I.a)
  4. antonsynd commented on Nov 5, 2026

    @antonsynd
    OwnerAuthor

    Drain set @ fd925ddca (measured): 27 rows cite this issue: CS0149 / CS0266 / CS1061 for a nested type. They cited #2423 only through a default arm in the harness's route, which is gone.

    Rows
    read/NestedType/ComprehensionElement/Later/Qualified/outer=None Ice
    read/NestedType/ComprehensionIterable/Later/Qualified/outer=None Ice
    read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/ConstInitializer/Later/Bare/outer=ModuleDef Ice
    read/NestedType/DataclassInitFieldInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleDef Ice
    read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleDef Ice
    read/NestedType/InstancePropertyDefault/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/InstancePropertyDefault/Later/Bare/outer=ModuleDef Ice
    read/NestedType/LambdaImmediate/Later/Bare/outer=ModuleVar Ice
    read/NestedType/LambdaImmediate/Later/Bare/outer=None Ice
    read/NestedType/LambdaImmediate/Later/Qualified/outer=None Ice
    read/NestedType/MethodBody/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/MethodBody/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/ComprehensionElement/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/ComprehensionElement/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/ComprehensionIterable/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/ComprehensionIterable/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/Lambda/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/Lambda/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticPropertyDefault/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticPropertyDefault/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StructInitFieldInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StructInitFieldInitializer/Later/Bare/outer=ModuleDef Ice
    

    These shas are on local dev, not pushed yet.

  5. antonsynd commented on Nov 6, 2026

    @antonsynd
    OwnerAuthor

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

    53 rows of src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt cite this issue (27 at the plan base 2279c0d), all read/NestedType/... Ice. When the cure lands, every one of these rows must drain: a stale row fails the sweep.

    Where the 26 new rows come from:

    • 22 from a4dcf02, which restored READ's pruned outers;
    • 4 from 8886c04 (axis 10, DeclaringRelation), where H5 routed the sibling-relation CS1955 cells here.

    Another 154 read/NestedType/... Ice rows (CS1955) still cite #2423. Whether they belong here is raised on #2423.

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


    Generated by Claude Code

  6. antonsynd commented on Nov 7, 2026

    @antonsynd
    OwnerAuthor

    A contradiction with the name-resolution harness, for an owner's letter at the next /batch-issues. Found by P77b's /verify-implementation refuter @ 8c0602b, by reading.

    This issue's Contract says N() inside the enclosing type constructs the nested type and prints 3. The harness's axis 10 (sibling nested type, Bare) is MustRefuse rule N1-methods, because a class-body name is not bare inside a nested body and python raises NameError(I). One program, two verdicts. 140 of this issue's 207 allowlist rows are tagged must-refuse (N2 51, N1-type-error 49, N1-methods 34, SPY0401 6), so curing it as the Contract says moves those rows to a loud red instead of draining them. Sample cells: read/NestedType/DataclassFieldInitializer/Earlier/Bare/outer=ModuleEnum, read/NestedType/InitBody/Later/Bare/outer=None.

    • (a) The Contract narrows to a nested type's own enclosing scope where N1 allows it, and the harness verdict stands.
    • (b) Axis 10 changes to MustRun, an N1-methods exception for a nested type's bare name: a designed deviation from python's NameError.
    • Recommendation: (a). N1 is the design of record, and (b) adds a deviation with no owner ruling behind it. The door is one-way for (b): a run verdict is hard to withdraw once programs depend on it.

    The ledger of cites that move rather than drain is on #2433.

  7. antonsynd commented on Nov 7, 2026

    @antonsynd
    OwnerAuthor

    Owner ruling, 2026-11-07: (a) the Contract narrows, and the harness's verdict stands. For the next /batch-issues to letter. Measured with sharpyc run (no compiler source differs from 8c0602b through f02932c) against python3 -I.

    The Contract now reads: a nested type's bare name in a position where N1 allows a class-body name (the class body itself) denotes the type, and a call constructs it. In a method, nested function, lambda or comprehension element, a bare value read of it is refused unless an outer binding of the name exists, in which case it reads that binding. The spelling there is C.N().

    shape Sharpy today python under the ruling
    method body, return N().tag SPY0908 CS1955 NameError refused, a diagnostic and not an ICE
    class body, b: int = N().tag SPY0908 CS1955 3 runs, 3
    sibling nested type, I().v from J's method SPY0908 CS1955 NameError refused
    method body, C.N().tag 3 3 unchanged
    method body with a module class N, N().tag 9 9 unchanged

    So both the must-refuse rows and the other 67 of this issue's 207 allowlist rows need the cure: this is still an ICE to fix in every position, in two directions.

    Three further cells from the same check, not yet ruled:

    shape Sharpy python class
    module class N and nested N, method body isinstance(o, N) with o = C.N() True False silent wrong: the bare name reaches the nested type where python reads the module's
    nested N only, same isinstance True NameError a value position that N1 refuses runs
    method body, self.N().tag SPY0203 "Type 'C' has no member 'N'" 3 false refusal, and python's own NameError suggests that spelling

    Type positions are not value reads and are left as they are: n: N = C.N() and def m(self) -> N: both print 3, as python does.

  8. antonsynd commented on Nov 7, 2026

    @antonsynd
    OwnerAuthor

    Drain set @ 87ac3853e (P77b, PR #2453 merged into dev): 207 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 207
    All 207 row(s)
    read/NestedType/AccessorGetBody/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/AccessorGetBody/Earlier/Bare/outer=None Ice
    read/NestedType/AccessorGetBody/Later/Bare/outer=ModuleVar Ice
    read/NestedType/AccessorGetBody/Later/Bare/outer=None Ice
    read/NestedType/AccessorSetBody/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/AccessorSetBody/Earlier/Bare/outer=None Ice
    read/NestedType/AccessorSetBody/Later/Bare/outer=ModuleVar Ice
    read/NestedType/AccessorSetBody/Later/Bare/outer=None Ice
    read/NestedType/ComprehensionElement/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/ComprehensionElement/Earlier/Bare/outer=None Ice
    read/NestedType/ComprehensionElement/Later/Bare/outer=ModuleVar Ice
    read/NestedType/ComprehensionElement/Later/Bare/outer=None Ice
    read/NestedType/ComprehensionElement/Later/Qualified/outer=None Ice
    read/NestedType/ComprehensionIterable/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/ComprehensionIterable/Earlier/Bare/outer=None Ice
    read/NestedType/ComprehensionIterable/Later/Bare/outer=ModuleVar Ice
    read/NestedType/ComprehensionIterable/Later/Bare/outer=None Ice
    read/NestedType/ComprehensionIterable/Later/Qualified/outer=None Ice
    read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleComputedConst Ice
    read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleProperty Ice
    read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/ConstInitializer/Earlier/Bare/outer=None Ice
    read/NestedType/ConstInitializer/Later/Bare/outer=ModuleComputedConst Ice
    read/NestedType/ConstInitializer/Later/Bare/outer=ModuleDef Ice
    read/NestedType/ConstInitializer/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/ConstInitializer/Later/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/ConstInitializer/Later/Bare/outer=ModuleProperty Ice
    read/NestedType/ConstInitializer/Later/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/ConstInitializer/Later/Bare/outer=ModuleVar Ice
    read/NestedType/ConstInitializer/Later/Bare/outer=None Ice
    read/NestedType/DataclassFieldInitializer/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/DataclassFieldInitializer/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/DataclassInitFieldInitializer/Earlier/Bare/outer=ModuleComputedConst Ice
    read/NestedType/DataclassInitFieldInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/DataclassInitFieldInitializer/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/DataclassInitFieldInitializer/Earlier/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/DataclassInitFieldInitializer/Earlier/Bare/outer=ModuleProperty Ice
    read/NestedType/DataclassInitFieldInitializer/Earlier/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/DataclassInitFieldInitializer/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/DataclassInitFieldInitializer/Earlier/Bare/outer=None Ice
    read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleComputedConst Ice
    read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleDef Ice
    read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleProperty Ice
    read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleVar Ice
    read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=None Ice
    read/NestedType/GeneratorBody/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/GeneratorBody/Earlier/Bare/outer=None Ice
    read/NestedType/GeneratorBody/Later/Bare/outer=ModuleVar Ice
    read/NestedType/GeneratorBody/Later/Bare/outer=None Ice
    read/NestedType/InitBody/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/InitBody/Earlier/Bare/outer=None Ice
    read/NestedType/InitBody/Later/Bare/outer=ModuleVar Ice
    read/NestedType/InitBody/Later/Bare/outer=None Ice
    read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleComputedConst Ice
    read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleProperty Ice
    read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=None Ice
    read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleComputedConst Ice
    read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleDef Ice
    read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleProperty Ice
    read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleVar Ice
    read/NestedType/InstanceFieldInitializer/Later/Bare/outer=None Ice
    read/NestedType/InstancePropertyDefault/Earlier/Bare/outer=ModuleComputedConst Ice
    read/NestedType/InstancePropertyDefault/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/InstancePropertyDefault/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/InstancePropertyDefault/Earlier/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/InstancePropertyDefault/Earlier/Bare/outer=ModuleProperty Ice
    read/NestedType/InstancePropertyDefault/Earlier/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/InstancePropertyDefault/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/InstancePropertyDefault/Earlier/Bare/outer=None Ice
    read/NestedType/InstancePropertyDefault/Later/Bare/outer=ModuleComputedConst Ice
    read/NestedType/InstancePropertyDefault/Later/Bare/outer=ModuleDef Ice
    read/NestedType/InstancePropertyDefault/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/InstancePropertyDefault/Later/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/InstancePropertyDefault/Later/Bare/outer=ModuleProperty Ice
    read/NestedType/InstancePropertyDefault/Later/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/InstancePropertyDefault/Later/Bare/outer=ModuleVar Ice
    read/NestedType/InstancePropertyDefault/Later/Bare/outer=None Ice
    read/NestedType/LambdaImmediate/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/LambdaImmediate/Earlier/Bare/outer=None Ice
    read/NestedType/LambdaImmediate/Later/Bare/outer=ModuleVar Ice
    read/NestedType/LambdaImmediate/Later/Bare/outer=None Ice
    read/NestedType/LambdaImmediate/Later/Qualified/outer=None Ice
    read/NestedType/LambdaPassed/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/LambdaPassed/Earlier/Bare/outer=None Ice
    read/NestedType/LambdaPassed/Later/Bare/outer=ModuleVar Ice
    read/NestedType/LambdaPassed/Later/Bare/outer=None Ice
    read/NestedType/LambdaStored/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/LambdaStored/Earlier/Bare/outer=None Ice
    read/NestedType/LambdaStored/Later/Bare/outer=ModuleVar Ice
    read/NestedType/LambdaStored/Later/Bare/outer=None Ice
    read/NestedType/MethodBody/Earlier/Bare/outer=ModuleComputedConst Ice
    read/NestedType/MethodBody/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/MethodBody/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/MethodBody/Earlier/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/MethodBody/Earlier/Bare/outer=ModuleProperty Ice
    read/NestedType/MethodBody/Earlier/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/MethodBody/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/MethodBody/Earlier/Bare/outer=None Ice
    read/NestedType/MethodBody/Later/Bare/outer=ModuleComputedConst Ice
    read/NestedType/MethodBody/Later/Bare/outer=ModuleDef Ice
    read/NestedType/MethodBody/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/MethodBody/Later/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/MethodBody/Later/Bare/outer=ModuleProperty Ice
    read/NestedType/MethodBody/Later/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/MethodBody/Later/Bare/outer=ModuleVar Ice
    read/NestedType/MethodBody/Later/Bare/outer=None Ice
    read/NestedType/NestedClassMethodBody/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/NestedClassMethodBody/Earlier/Bare/outer=None Ice
    read/NestedType/NestedClassMethodBody/Later/Bare/outer=ModuleVar Ice
    read/NestedType/NestedClassMethodBody/Later/Bare/outer=None Ice
    read/NestedType/NestedDefInMethod/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/NestedDefInMethod/Earlier/Bare/outer=None Ice
    read/NestedType/NestedDefInMethod/Later/Bare/outer=ModuleVar Ice
    read/NestedType/NestedDefInMethod/Later/Bare/outer=None Ice
    read/NestedType/ParameterDefault/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/ParameterDefault/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/StaticInitializer/ComprehensionElement/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/ComprehensionElement/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/StaticInitializer/ComprehensionElement/Earlier/Bare/outer=None Ice
    read/NestedType/StaticInitializer/ComprehensionElement/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/ComprehensionElement/Later/Bare/outer=ModuleVar Ice
    read/NestedType/StaticInitializer/ComprehensionElement/Later/Bare/outer=None Ice
    read/NestedType/StaticInitializer/ComprehensionIterable/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/ComprehensionIterable/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/StaticInitializer/ComprehensionIterable/Earlier/Bare/outer=None Ice
    read/NestedType/StaticInitializer/ComprehensionIterable/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/ComprehensionIterable/Later/Bare/outer=ModuleVar Ice
    read/NestedType/StaticInitializer/ComprehensionIterable/Later/Bare/outer=None Ice
    read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleComputedConst Ice
    read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleProperty Ice
    read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/StaticInitializer/Earlier/Bare/outer=None Ice
    read/NestedType/StaticInitializer/Lambda/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/Lambda/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/StaticInitializer/Lambda/Earlier/Bare/outer=None Ice
    read/NestedType/StaticInitializer/Lambda/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/Lambda/Later/Bare/outer=ModuleVar Ice
    read/NestedType/StaticInitializer/Lambda/Later/Bare/outer=None Ice
    read/NestedType/StaticInitializer/Later/Bare/outer=ModuleComputedConst Ice
    read/NestedType/StaticInitializer/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticInitializer/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/StaticInitializer/Later/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/StaticInitializer/Later/Bare/outer=ModuleProperty Ice
    read/NestedType/StaticInitializer/Later/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/StaticInitializer/Later/Bare/outer=ModuleVar Ice
    read/NestedType/StaticInitializer/Later/Bare/outer=None Ice
    read/NestedType/StaticMethodBody/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/StaticMethodBody/Earlier/Bare/outer=None Ice
    read/NestedType/StaticMethodBody/Later/Bare/outer=ModuleVar Ice
    read/NestedType/StaticMethodBody/Later/Bare/outer=None Ice
    read/NestedType/StaticPropertyDefault/Earlier/Bare/outer=ModuleComputedConst Ice
    read/NestedType/StaticPropertyDefault/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StaticPropertyDefault/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/StaticPropertyDefault/Earlier/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/StaticPropertyDefault/Earlier/Bare/outer=ModuleProperty Ice
    read/NestedType/StaticPropertyDefault/Earlier/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/StaticPropertyDefault/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/StaticPropertyDefault/Earlier/Bare/outer=None Ice
    read/NestedType/StaticPropertyDefault/Later/Bare/outer=ModuleComputedConst Ice
    read/NestedType/StaticPropertyDefault/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StaticPropertyDefault/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/StaticPropertyDefault/Later/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/StaticPropertyDefault/Later/Bare/outer=ModuleProperty Ice
    read/NestedType/StaticPropertyDefault/Later/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/StaticPropertyDefault/Later/Bare/outer=ModuleVar Ice
    read/NestedType/StaticPropertyDefault/Later/Bare/outer=None Ice
    read/NestedType/StructFieldInitializer/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/StructFieldInitializer/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/StructInitFieldInitializer/Earlier/Bare/outer=ModuleComputedConst Ice
    read/NestedType/StructInitFieldInitializer/Earlier/Bare/outer=ModuleDef Ice
    read/NestedType/StructInitFieldInitializer/Earlier/Bare/outer=ModuleEnum Ice
    read/NestedType/StructInitFieldInitializer/Earlier/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/StructInitFieldInitializer/Earlier/Bare/outer=ModuleProperty Ice
    read/NestedType/StructInitFieldInitializer/Earlier/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/StructInitFieldInitializer/Earlier/Bare/outer=ModuleVar Ice
    read/NestedType/StructInitFieldInitializer/Earlier/Bare/outer=None Ice
    read/NestedType/StructInitFieldInitializer/Later/Bare/outer=ModuleComputedConst Ice
    read/NestedType/StructInitFieldInitializer/Later/Bare/outer=ModuleDef Ice
    read/NestedType/StructInitFieldInitializer/Later/Bare/outer=ModuleEnum Ice
    read/NestedType/StructInitFieldInitializer/Later/Bare/outer=ModuleLiteralConst Ice
    read/NestedType/StructInitFieldInitializer/Later/Bare/outer=ModuleProperty Ice
    read/NestedType/StructInitFieldInitializer/Later/Bare/outer=ModuleTypeAlias Ice
    read/NestedType/StructInitFieldInitializer/Later/Bare/outer=ModuleVar Ice
    read/NestedType/StructInitFieldInitializer/Later/Bare/outer=None Ice
    read/sibling/Bare/NestedClassMethodBody/Earlier Ice
    read/sibling/Bare/NestedClassMethodBody/Later Ice
    read/sibling/Bare/StaticInitializer/Earlier Ice
    read/sibling/Bare/StaticInitializer/Later Ice
    

    Generated by Claude Code

  9. antonsynd commented on Nov 8, 2026

    @antonsynd
    OwnerAuthor

    Batching 2026-11-08 @ 10e1c1b — charter docs/process/rounds/remediation-round-2026-09-20-batching.md §3.33, P16 — type-denoting reference totality (order 33). Two letters:

    R-MG (owner, 2026-11-07, lettered at this call): (a) the Contract narrows, and the harness's verdict stands. A nested type's bare name denotes the type where N1 allows a class-body name (the class body: b: int = N().tag runs, 3); in a method, nested function, lambda or comprehension element a bare value read is refused unless an outer binding exists, in which case it reads that binding; the spelling there is C.N(). Both the must-refuse rows and the class-body rows of the 207 need the cure — still an ICE in every position, in two directions. Rejected: (b) the harness yields to the issue's original contract (bare N() constructs everywhere).

    R-LQ (owner, 2026-11-08): (a) self.N() is ADMITTED, lowered type-qualified as C.N() — one rule for class attributes read through self, the rule P30 (#2147) already gives const/static members; python prints 3 and its own NameError steers users to this spelling; today SPY0203. One-way for programs that then compile. Rejected: (b) keep the refusal with a C.N() steer.

    The two isinstance cells of your 11-07 comment follow R-MG with no ruling of their own: a bare N in a method body is a value read, so with a module N it reads the module's (python False) and with none it is refused (python NameError). Type positions stay as they are.


    Generated by Claude Code

  10. antonsynd commented on Nov 20, 2026

    @antonsynd
    OwnerAuthor

    Cell from P78's planning (plan-777361, PR #2767), 2026-11-20 — 32 name-resolution allowlist rows that are R-LQ's currently cite #2423.

    In src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt @ e24aaf9, 32 rows citing #2423 are rule N7, family read/NestedType/…, spellings SelfDot / alias: self.N() or A.N() on a nested type. Every one is tagged must-run, python runs it, and Sharpy refuses with SPY0203 (+ SPY0453). Counted by joining the allowlist with the sweep's cell dump from a run at that sha (299/0/0 on the name-resolution filter).

    Example (read/NestedType/AccessorGetBody/Earlier/SelfDot/outer=None):

    class H:
        class x:
            v: int = 20
        property get r(self) -> int:
            return self.x().v
    def main() -> None:
        print(H().r)

    python3 (3.15.2): 20. Sharpy: SPY0203.

    R-LQ (charter §4) admits self.N() on a nested type, lowered C.N(), and gave it to P16 under this issue. P78 is Semantic-only and does not implement it, so P78's stage 0 re-cites these 32 rows from #2423 to #2397; they drain with P16, not with #2423's close.


    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