diff --git a/.github/workflows/dotnet10.yml b/.github/workflows/dotnet10.yml index 3ce96f9ce..6f1548d7f 100644 --- a/.github/workflows/dotnet10.yml +++ b/.github/workflows/dotnet10.yml @@ -10,7 +10,8 @@ # ├─ lsp (matrix 1..N) LSP tests, sharded by namespace and sweep twin # ├─ compiler (1..9) the pre-#2178 "Test Compiler" step, sharded by namespace/class # ├─ sweep (matrix 2) one job per long GapDiscovery sweep -# ├─ sweeps-quick the five short GapDiscovery sweeps, one step each +# ├─ sweeps-quick four short GapDiscovery sweeps and the two name-resolution +# │ differentials (P77a, P78's stage 0), one step each # ├─ stdlib-spy-gates .spy native compile + generated-C# staleness gates # └─ shard-partition proves each suite's shards partition its main filter # @@ -42,13 +43,19 @@ # over the 20 mainline push runs before it (42372810738 back to 40623113848; for `compiler`, 2x # the ~11 min projected for the class-split shard 6 at first, and since #2690 the 40 given at the # end of this paragraph), never under 5, in place of the 6-hour -# default; every test run but one (below) has `--blame-hang-timeout 10m`, so a test silent for 10 min aborts the +# default; every test run but two (below) has `--blame-hang-timeout 10m`, so a test silent for 10 min aborts the # run red ("The active test run was aborted") long before the job limit. The longest single test, # NameResolutionDifferential_Sweep, took 372 s in 42372810738; with P77 (#2742) it took 10 m 06 s # and 10 m 29 s (runs 44347230877, 44370550669; dev 6 m 25 s to 8 m 13 s, its last three runs), # so its step alone has `--blame-hang-timeout 22m` and `sweeps-quick` 40, 2x, by the owner's # ruling of 2026-11-18 ("raise then shard after to claw back"; sharding it is #2458's). No dump is taken # (`--blame-hang-dump-type none`): a full one is ~700 MB and nothing uploads it. +# The second such test is ScopeMeaning_Sweep (P78's stage 0, PR #2767): one silent test of 8 m 24 s +# in Compiler shard 1 under the 10 m limit (run 44825279604, where that shard's job took 22 m 48 s +# against its 40). By the owner's ruling of 2026-11-20 (#2423 comment 7052893050, item 27) it runs +# in `sweeps-quick` with `--blame-hang-timeout 18m` (2x is 16 m 48 s), and that job's limit is 60: +# 2x its slowest run with P77 (19 m 40 s) plus this step, taken as 9 m 15 s (the sweep and the +# class's other facts; not yet measured as a step, so the first run with it re-measures both). # Coverage-on runs (COVERAGE_ON below) carry their own limit, 2x their coverage-on duration: the # covered jobs' `timeout-minutes` read the same predicate (`test-fast` 20/15, `lsp` 30/20), set # from local measurement (#2512: Compiler shard 3 +102%); the first coverage-on push re-measures @@ -146,7 +153,10 @@ env: # repetition) and its controls, which must keep running in the shards — a bare # `FullyQualifiedName!~InProcessIsolation` would leave them selected by no step # (CiFilterCoverageConformanceTests). - COMPILER_MAIN_FILTER: "Category!=Benchmark&FullyQualifiedName!~InteropConformance&FullyQualifiedName!~MetamorphicCorpus&FullyQualifiedName!~DifferentialExecution&FullyQualifiedName!~FormatSpecDifferential&FullyQualifiedName!~FormatterEmitInvariance&FullyQualifiedName!~NameResolutionDifferential&(Category!=GapDiscovery|FullyQualifiedName!~InProcessIsolation)" + # The scope-meaning differential (P78's stage 0) is excluded with its sibling, the name-resolution + # differential: its sweep is one test that stays silent for most of a shard's 10 m hang limit + # (see "Hang limits" above), so it has a step and a limit of its own in `sweeps-quick`. + COMPILER_MAIN_FILTER: "Category!=Benchmark&FullyQualifiedName!~InteropConformance&FullyQualifiedName!~MetamorphicCorpus&FullyQualifiedName!~DifferentialExecution&FullyQualifiedName!~FormatSpecDifferential&FullyQualifiedName!~FormatterEmitInvariance&FullyQualifiedName!~NameResolutionDifferential&FullyQualifiedName!~ScopeMeaningDifferential&(Category!=GapDiscovery|FullyQualifiedName!~InProcessIsolation)" # Compiler shard buckets (#2178). Shard n runs COMPILER_MAIN_FILTER&COMPILER_SHARD_. # PARTITION INVARIANT: shards 1–6, 8 and 9 are positive namespace or class buckets (shard 5 # excludes the buckets of shards 4, 6 and 8 by negation); shard 7 is "everything else" @@ -627,7 +637,7 @@ jobs: if-no-files-found: warn sweep: - # The two long GapDiscovery sweeps (~5 min each), one job apiece; the five others share + # The two long GapDiscovery sweeps (~5 min each), one job apiece; the six others share # `sweeps-quick`. Every sweep is excluded from the Compiler shards by name (COMPILER_MAIN_FILTER). name: Sweep (${{ matrix.name }}) needs: build @@ -703,11 +713,14 @@ jobs: # on CI this job took 12 m 16 s, of which that step 7 m 00 s, @ 8c0602b35, run 42332177803, # measured), one step each in one job. Each still writes its own sweep-.trx, and each # reports even if an earlier one failed. With P77 (#2742) the job took 19 m 40 s and 17 m 17 s - # (runs 44347230877, 44370550669), so its limit is 40, 2x (#2458; owner, 2026-11-18). + # (runs 44347230877, 44370550669), so its limit was 40, 2x (#2458; owner, 2026-11-18). With the + # scope-meaning differential's step (P78's stage 0; owner, 2026-11-20, #2423 comment 7052893050 + # item 27) the limit is 60: 2x of 19 m 40 s plus that step, taken as 9 m 15 s from the 8 m 24 s + # its sweep took in Compiler shard 1 (run 44825279604). The job's name is unchanged. name: Sweeps (interop, differential-execution, format-spec, formatter-emit, name-resolution) needs: build runs-on: ubuntu-latest - timeout-minutes: 40 + timeout-minutes: 60 env: # The python oracles below FAIL instead of skipping when no Python 3.12+ interpreter is found: # a skipped sweep guards nothing and the job's other facts would keep it green. Job level, so @@ -801,6 +814,19 @@ jobs: # ci-summary's zero-test check green. if: ${{ !cancelled() && steps.unpack.outcome == 'success' }} run: dotnet test src/Sharpy.Compiler.Tests --no-build --verbosity normal --filter "Category=GapDiscovery&FullyQualifiedName~NameResolutionDifferential" --logger "trx;LogFileName=sweep-name-resolution-differential.trx" --results-directory TestResults --blame-hang-timeout 22m --blame-hang-dump-type none + - name: Sweep scope-meaning-differential + # Scope-meaning differential sweep (P78's stage 0, plan-777361; #2423, #2432). The cells of + # rules N1, N2, N4 and N7 the name-resolution pool has no program for, their verdicts read + # from the same rule table (Conformance/name-resolution-rules.txt): Sharpy `run` against the + # table and, where python3 runs the same program, against python3. Writes + # .claude/tmp/scope-meaning-differential-cells.jsonl and ratchets the reviewed allowlist + # (src/Sharpy.Compiler.Tests/Conformance/scope-meaning-differential-allowlist.txt). The step + # runs the class's facts with its sweep, as the step above does. Excluded from the Compiler + # shards by name (COMPILER_MAIN_FILTER) so it runs exactly once. Its sweep is one test that + # prints nothing for 8 m 24 s on CI (run 44825279604, in Compiler shard 1), so the hang limit + # is 18m, 2x (see "Hang limits" at the top). It FAILS without a suitable python3. + if: ${{ !cancelled() && steps.unpack.outcome == 'success' }} + run: dotnet test src/Sharpy.Compiler.Tests --no-build --verbosity normal --filter "Category=GapDiscovery&FullyQualifiedName~ScopeMeaningDifferential" --logger "trx;LogFileName=sweep-scope-meaning-differential.trx" --results-directory TestResults --blame-hang-timeout 18m --blame-hang-dump-type none - name: Sweep formatter-emit-invariance # Formatter emit-invariance sweep (#2062, #2068). Every executing single-file fixture # P: the Roslyn-normalised C# of Format(P) equals P's with every #line directive line @@ -1082,7 +1108,7 @@ jobs: return sorted(int(k[len(prefix):]) for k in os.environ if k.startswith(prefix)) sweeps = ["interop-conformance", "metamorphic-corpus", "differential-execution", "format-spec-differential", "formatter-emit-invariance", "in-process-isolation", - "name-resolution-differential"] + "name-resolution-differential", "scope-meaning-differential"] expected = (["cli", "core", "stdlib", "windows"] + [f"lsp-shard-{n}" for n in shards("LSP_SHARD_")] + [f"compiler-shard-{n}" for n in shards("COMPILER_SHARD_")] + [f"sweep-{s}" for s in sweeps]) if os.environ.get("CODE") == "false": diff --git a/build_tools/scorecard-baseline.json b/build_tools/scorecard-baseline.json index fc371e29e..7a232a157 100644 --- a/build_tools/scorecard-baseline.json +++ b/build_tools/scorecard-baseline.json @@ -1,6 +1,6 @@ { "procedure_bytes": 145560, "claude_md_bytes": 9304, - "allowlist_rows_outside_seed": 572, - "allowlist_rows_seed": 2377 + "allowlist_rows_outside_seed": 2184, + "allowlist_rows_seed": 2368 } diff --git a/build_tools/tests/test_ci_gate.py b/build_tools/tests/test_ci_gate.py index 573939e5c..56db1f639 100644 --- a/build_tools/tests/test_ci_gate.py +++ b/build_tools/tests/test_ci_gate.py @@ -553,6 +553,7 @@ class TestCiSummaryContract: "formatter-emit-invariance", "in-process-isolation", "name-resolution-differential", + "scope-meaning-differential", ] def summarize( @@ -598,20 +599,20 @@ def summarize( def test_counts_every_trx_once_and_leave_out_windows(self, tmp_path: Path) -> None: output = self.summarize(tmp_path) assert output.returncode == 0, output.stderr - # 9+20+30+40+50 passed, plus 7 sweeps. Windows' 14 re-run tests the shards already count, + # 9+20+30+40+50 passed, plus 8 sweeps. Windows' 14 re-run tests the shards already count, # and the two per-suite "sum of shards" rows must not count anything a second time. - assert "GATE-COUNTS passed=156 failed=0 skipped=1" in output.stdout + assert "GATE-COUNTS passed=157 failed=0 skipped=1" in output.stdout def test_failed_names_are_printed(self, tmp_path: Path) -> None: output = self.summarize(tmp_path, failed=["Ns.Class.Method"]) - assert "GATE-COUNTS passed=155 failed=1 skipped=1" in output.stdout + assert "GATE-COUNTS passed=156 failed=1 skipped=1" in output.stdout assert "GATE-FAILED Ns.Class.Method" in output.stdout def test_a_windows_failure_is_labelled_because_the_total_omits_it( self, tmp_path: Path ) -> None: output = self.summarize(tmp_path, windows_failed=["Win.Class.Method"]) - assert "GATE-COUNTS passed=156 failed=0 skipped=1" in output.stdout + assert "GATE-COUNTS passed=157 failed=0 skipped=1" in output.stdout assert "GATE-FAILED [windows] Win.Class.Method" in output.stdout def test_only_a_readme_only_run_states_its_scope(self, tmp_path: Path) -> None: @@ -660,7 +661,7 @@ def test_ci_gate_parses_what_ci_summary_really_prints( ) result = rig.gate() assert result.returncode == 1 - assert f"CI GATE RED: 155/1/1 @ {SHA[:9]}" in result.stdout + assert f"CI GATE RED: 156/1/1 @ {SHA[:9]}" in result.stdout failed = [ line for line in result.stdout.splitlines() if line.startswith("FAILED ") ] diff --git a/docs/process/plans/plan-777361.md b/docs/process/plans/plan-777361.md new file mode 100644 index 000000000..93a21c2cd --- /dev/null +++ b/docs/process/plans/plan-777361.md @@ -0,0 +1,140 @@ + + +# P78 — N1/N2/N4/N7: scope decides meaning + +## Context + +Rules N1, N2, N4 and N7 of `docs/design/name-resolution.md` (charter §3.20l): #2423 (tracker), #2398, #2432. #2426 closes here. + +## Current State + +`sharpyc run` @ 08eda11e2 (code e24aaf9f0); python 3.15.2. The known-red rows are the state. By class: order and kind; untyped reads and bodies (#2398); constant positions (#2432); R-QI (module `x: T` reads `0`). + +## Scope + +- **Group:** P78 (chores: none). #2432 stays in (R-KV). +- **Tier:** full (c: the seam is under `Semantic/`) — from charter §3.20l +- **Alone:** no — verdicts, not layout; no snapshot moves (A12) +- **Gates:** 1 — `/ci-gate` on the pushed tip, counts `@ sha (measured)` +- **Filing:** findings ledger; the lead files by class (contract §10) +- **Override:** none +- Extra verify pass 3: owner, 2026-11-20 "run a third verify pass" +- Extra verify pass 4: owner, 2026-11-20 "run a fourth verify pass when the revision lands" + +## Defect Class + +- **Violated contract:** what a module-level or class-level name means, the type a read of it has, and whether the read is legal are one answer for every binding kind, declaration order, spelling and reading position; where python's top-to-bottom reading means something else the read is refused under one code; a constant position refuses a non-constant itself. +- **Meta-class:** silent wrong behavior; position/route missing a shared check; SPY0908 as a net → **standard cure:** one resolution seam per scope, a semantic-time refusal, the conformance sweep. +- **Known member cells:** #2423, #2398, #2432; the folded #2415 (C08) and #2416 method-group cells; R-QI's cells (#2427, comment 6967863739). +- **Sibling cells this plan must also cover:** none; see Generator. +- **Lane / reach:** false-refusal + silent-wrong + ice · program; **fidelity-scope row:** "which programs run vs. are refused" and "value of an expression", both COMPARED. +- **Standing harness that should have caught it:** `NameResolutionDifferentialTests`; `ClassBodyReadPositionMatrixTests` is the hand control (R-KF; A6). +- **Generator:** stage 0 (§2.1) @ 08eda11e2. `name-resolution-rules.txt` (S0a, #2487): one row per cell of both pools and a cell per row. `NameResolutionDifferentialTests`: 8951 cases, 2368 known-red rows. `ScopeMeaningDifferentialTests` (S0b): 4963 cases, 1612 known-red rows (637 / 766 / 150 / 17 / 42 cite #2423 / #2432 / #2417 / #2147 / #2277), verdicts read from the rows. Each S0b axis is an image, every value generated or excluded with a reason, 40 probed. Hand lists, each a decision: one host program per reader, one or two members per kind, one outer binding per sibling form, one value per declared type, one call per lambda spelling, the census's namespace (`System`). Closed by decision: the chain pair (call 45), the five other `Scope*` enums, one call site per callee cell (D5's census), a constant position's hosts (ruling 22). Excluded: the project route (A3, A14), message text, an interface's members (#2383, #2111), an int enum's `.value` / `.name` through an alias, a lambda's dotted annotation, its default when stored or in a property default, `char` as a receiver; ruling 26: third-type and `G[int]` readers, four callee binders, an arrow-lambda host. Green by D1–D7, D10 (A1, A2, A4–A7, A13), D8 (A9). +- **Owner rulings:** R-KD, R-KF, R-KG, R-KJ, R-KV, R-LJ, R-LO, R-PM, R-QE, R-QI (charter §4); #2432's call-43 and call-45 cells (§3.20l); owner 2026-11-20, #2423 comments 7030074628 (1–4), 7039834146 (5–6), 7042723494 (7–9), 7045166298 (10), 7046304965 (12–13), 7049561049 (17, 19–20), 7050154806 (22), 7051706467 (23–25), 7052893050 (26–29). + +## Adversarial Review (pre-mortem) + +- **Alternative root cause:** "bodies are checked in textual order" — refuted: the same function reads a later `const`, `def` and class; only the variable's symbol is missing. Second cause: a symbol is untyped until its declaration is checked (D2). +- **Alternative layer:** scoping has no `.spy`, dunder or protocol spelling; D8's CLR arm is rung 3. +- **How the fix could be inert:** D1 without D2 leaves CS0029; F2's yield above the N2 refusal keeps `64`; a callee site on its own lookup keeps `12`. +- **Before/after by direction:** newly refused and `worked`, each ruled: N2's cells whatever the member's kind or position, an attribute argument included (`64`, `3`; R-KD, R-KJ); a nested type's bare read of its enclosing type's `const` (`7`; R-KG); a class member read bare in a comprehension element of a `@static` initializer (`2`; N1); a module initializer under a later same-named declaration (`2`, python `7`; R-LJ); a declaration with no initializer (R-QI; none in 4,565 `.spy` files, 22 in five spec files: A11); an unused alias to a missing type (`1`; D10). Newly running: every order-only refusal, a lambda's default naming a member (`12` under a module binding; ruling 19), and bare imported `PIPE` as a default. D8 refuses nothing that runs. +- **Blast radius:** the whole gate; Stdlib.Tests (module variables), cold/warm and `FrontEndParityTests` first. +- **Generated artifacts touched:** none may move (A12); the oracle ledger follows T11. + +## Design Decisions + +No rule below reads a builtin or type name; a rung applies only in D8. +- **D1 (module variables are declared first).** `NameResolver.ResolveDeclaration` declares every module-level `VariableDeclaration`, annotated or `auto`, as it does a `const`; `TypeChecker.CheckVariableDeclaration` completes that symbol. A module `let` (SPY0340) and a second declaration of the name (#2125) keep today's verdicts (P21b). Predicates: no module-level `VariableSymbol` is created by `TypeChecker`; a variable's export is its declared symbol, cold and warm, so the identity-bridge arm of `ImportedStaticFacts.ImportedStorage` and `SemanticBinding`'s module-value map are deleted (its first arm stays). +- **D2 (a read is typed whatever the order).** `CheckModule` resolves every declared type before it checks a body or an initializer: annotated module variables and module properties beside the consts, and each type's annotated members (fields, consts, properties, method signatures, union cases), nested types included. An unannotated module-level or type-level value is checked on its first read, in its own declaration's scope state, under an in-progress mark; a read that re-enters its own inference stays `Unknown` as today and adds no refusal (the cycle graph's SPY0278 is a ring's). Predicate: no read of a declared module-level or type-level name is `Unknown` because of where the declaration stands. +- **D3 (one class-body rule: N1, N2, N4, N7).** `TryResolveClassBodySiblingRead` decides a bare read of a member its type body declares by four facts: the member's level (type or instance), its order against the reader, whether a binding outside the body holds the name, and the position. Earlier: the member. At-or-after with an outer binding: SPY0619 in every position and for every member kind, instance included, judged before the kind refusal and SPY0401. At-or-after with none: the member, a forward read (N3); a self read is the cycle graph's. Outside N2 an instance member keeps its kind refusal and never yields, a parameter default keeps SPY0401 for a non-constant, an inherited member R1 (b). Deleted: F1's refusal, F2's yield, the `const` exemption in `IsDeclaredLater`, `ReportAmbiguousLaterConstReads`. Predicate: the verdict never reads `IsConstant`, the compile-time fact or the spelling. +- **D4 (bodies do not see class variables: N1, R-KG).** `Scope.ResolveName` crosses a type body from a nested type's body as from a function-like scope: no field, `const` or property of an enclosing type binds there bare. The crossing is variable-only, as today: a type, alias, type parameter or function still binds. `ClassifyClassBodyReadPosition` names three more positions — a nested type's body, a lambda in an initializer, a comprehension's body (all but its first iterable) — each with its phrase in the one SPY0200 steer. A lambda's parameter default, `lambda` or arrow, is not its body: in a class-level initializer D3 decides it, as a `def`'s (ruling 19). With an outer binding the read is that binding (R-Y), recorded through `SetModuleAccessCrossesClassMember` for an imported name as for a module variable. Predicate: every scope kind between a read and a type body is classified, with no default arm. +- **D5 (one callee resolver).** A bare callee resolves by the scope walk a bare read uses and dispatches on the symbol it bound, whatever an outer binding of the name is. The 33 direct `LookupFunctionOverloads` / `BuiltinRegistry.GetFunction` / `GetFunctionOverloads` sites in `TypeChecker*.cs` go behind it; a census test pins the remainder at the helper's own. A constructor's overload set is the whole body's. +- **D6 (N2 at module level; R-LJ).** A read evaluated at load — a module-level or class-level initializer or default, never a function body — of a builtin name its module declares at or after the reader is SPY0619. An import its module redeclares stays SPY0204 at the declaration. +- **D7 (R-QI).** A module variable, a `@static` field, and a module or `@static` auto-property with no initializer is SPY0620 at its declaration, whatever its type and host; the steer names `x: T = ` and `x: T | None = None`. Untouched: an instance field, a local `x: T`, a property with accessor bodies. +- **D8 (#2432; Semantic, Validation, CodeGen).** One answer per name the checker bound, for the identifier and member hooks, under every spelling (N7). True: a `const` whose fact is true; an int enum's member and its `.value`; and — rung 3: a referenced assembly's constant has no Sharpy symbol — a field of a referenced type or module that C# reads as a constant (a module's by discovery's `IsConst`; a type's or enum's by `FieldInfo.IsLiteral` or, except at an attribute argument, `DecimalConstantAttribute`, through `ClrTypeHelper`). False: every other bound name (a `@static` member, own or inherited; a module variable, property or function; a string enum's member, any `.name`; a CLR static that is no such constant). The shape rule keeps only what the checker did not bind. Every `IsAdmitted` call passes the answer: a `const` handed a non-constant is a computed constant, never C#'s `const`; a struct auto-property is a constructor parameter only for a constant (`MarkStructConstructorProperty`) and otherwise keeps its initializer and runs; the validator judges an enum member's value (a new `AdmissionTable` row), pushes interface and union hosts on `_enclosingTypes`, and refuses an attribute argument under SPY0425, each argument first checked by the checker as an expression in the scope its declaration stands in (a member's attribute in its type's body, so D3 and D4 decide its bare names) and printed by `GenerateAttributeArgumentExpression`'s ordinary read route. A `ComparisonChain` is admitted when each link is. Predicate: in contract, no expression reaches C# as a non-constant in a constant position, and no constant admitted today is refused. +- **D9 (codes).** SPY0619 (N2; the text carries both readings and the qualified spelling) and SPY0620 (R-QI); SPY0618 retires. T8 edits, in one commit, the table's rows, the `Expect*` arms that mirror them and `AdmittedRefusals`: D3's N2 cells leave `kind:instance-at-initializer` and `SPY0401`, N2 admits SPY0619 alone, N2-module SPY0619 and SPY0204, `kind:enum-member-constant` SPY0401, `N1-arity` names its code. +- **D10 (an alias names a type that exists; owner).** An alias whose target names a missing type — as the name itself, inside a wrapper, type argument or callable, dotted, or in a generic alias's body — is SPY0202 at the alias, at every site (module, type body, function, block), named or not: both binders resolve the target where the alias is declared, expanding none that reaches its own alias (#2769, unruled: unused, it still runs). Predicate: no declared alias's target names a missing type. +- **Out of contract:** a read above a same-scope local (P80); a store without `global` (P79); a walrus over `let` (P21b); `ALSO = RED` (#2069); a receiver read untyped at either order (#2417); `self.x` of a `const` (#2147); a self-reaching alias named by an annotation (#2769); the #2397 rows; `T !E` above its `E` (#2249); `from m import x` as a live alias (N6); a `delegate`'s default, a signature-only interface method's, attributes not on a class's method, a union's attribute arguments (#2779; ruling 22). + +## Implementation + +### Phase 1: Names are order-free and typed (N1) + +**Acceptance:** +- **A1.** #2423's module-level rows under N1, N1-nesting and N3 drain (D1, D2) — **M1:** declare only annotated variables → the `auto` cells red +- **A2.** S0b's typed-read rows citing #2423 drain: SPY0220 at both orders, under every spelling and reader position — **M2:** skip a type's members in the pre-pass → the annotated-member cells CS1503; drop the first-read check → the inferred ones; remove the in-progress mark → a ring of two `auto` lambdas (`1`) never ends +- **A3.** `StaticStorageFactsRoundTripTests` and `ColdWarmBuildDifferentialTests` hold a variable's export equal to its declared symbol, cold and warm, per importer form — **M3:** create the symbol in `CheckVariableDeclaration` again → the cold cell red +- **A4.** The N1-innermost rows and the module-level N1-type-error and N1-arity rows drain; S0b's callee cells print `1` under every outer binding and its later-`__init__` cell runs — **M4:** send one site back to `LookupFunctionOverloads` → red, and the census pin red +- **A13.** S0b's missing-target alias cells are SPY0202 at every site and shape, named or not; their controls run — **M13:** resolve at first use → the unused cells print `1`; skip the function-scoped binder → its cells do; expand a self-reaching target → a stack overflow + +#### Tasks + +- **T1. Module variables (D1)** — `NameResolver*.cs`, `TypeChecker.Statements.cs`, `ProjectCompiler.Phases.cs`, `StaticStorageFacts.cs`. (A1, A3) +- **T2. Types before reads (D2)** — `TypeChecker*.cs`. (A1, A2) +- **T3. One callee resolver (D5)** — D5's 33 sites; the census in `DispatchSiteInventoryTests`. (A4) +- **T12. Alias targets (D10)** — `ResolveTypeAliasDeclaration`, `RegisterScopedTypeAlias`, `TypeResolver.cs`. (A13) + +### Phase 2: Ambiguity and bodies (N2, N4, N7) + +**Acceptance:** +- **A5.** #2423's type-level and N2-module rows drain, C08's pin in `StaticInitializerOrderMatrixTests` moves to SPY0619, and no cell under N2 answers with another code — **M5:** restore F2's yield → `64`; restore the `const` exemption → `3`; report under SPY0200 → red; let a function body count for D6 → its controls red +- **A6.** The #2398 rows and #2423's R-Y, N1-methods and R-KG rows drain, S0b's lambda-default rows with them; the hand control, scope {own body, nested type at two depths, lambda in an initializer, comprehension body} × host {class, struct, interface, union}, holds one diagnostic with its position's phrase — **M6:** drop D4's crossing → SPY0909; give the lambda the method-body text → red; judge a lambda's default as its body → SPY0200 +- **A7.** S0b's R-QI cells are SPY0620 in every host and for every declared type; their controls run — **M7:** skip `@static` → red; include instance fields → the control red +- **A8.** Direction record: every fixture, spec block and `.spy` stdlib module newly refused, under any code, with its prior behaviour; none `worked` outside the rulings above + +#### Tasks + +- **T4. The class-body rule (D3)** — `TypeChecker.ClassScopeRule.cs`, `TypeBodyMembership.cs`. (A5) +- **T5. Bodies and nested types (D4)** — `Scope.cs`, `SymbolTable.cs`, `TypeChecker.ClassScopeRule.cs`. (A6) +- **T6. N2 at module level (D6)** — `TypeChecker.Expressions.cs`. (A5) +- **T7. No-initializer refusal (D7)** — `TypeChecker*.cs`. (A7) +- **T8. Codes (D9)** — `DiagnosticCodes.cs`, `DiagnosticExplanations.Semantic.cs`; D9's table edit. (A5, A7) +- **T9. Hand control** — `ClassBodyReadPositionMatrixTests`: its copy of the contract becomes D3 and D4. (A6) + +### Phase 3: Constant positions (#2432) + +**Acceptance:** +- **A9.** The #2432 rows of both allowlists drain, each S0b constant-kind cell as its row says, under every spelling and placement (a non-constant refused, computed or kept by its position; a referenced literal run everywhere) — **M9:** answer null for a bound non-constant → CS1736; answer false for a type's literal → `int.max_value` SPY0401; for a decimal constant → `decimal.one` SPY0401; skip the enum row → CS0133; classify the struct property with no resolver → CS1736; admit every chain → `0 < 2 in [1, 2]` reaches C#; skip the attribute argument's check → CS0120; check it at module scope → a bare sibling `const` SPY0425; keep the attribute printer's member arm → CS0103 +- **A10.** An interface or union parameter default draws one diagnostic — **M10:** drop either push → two +- **A14.** Per importer form, a two-file fixture reads an imported literal `const`, an imported class's and a computed one at a parameter default: `5 9`, then SPY0401 — **M14:** answer false for an imported constant → SPY0401 + +#### Tasks + +- **T10. Constants (D8)** — `ConstantPositionValidator.cs`, `ConstantDefaultClassifier.cs`, `ConstEligibility.cs`, `CodeGenInfoComputer.cs`, `TypeChecker.Definitions.cs`, `RoslynEmitter.TypeDeclarations.cs`. (A9, A10, A14) + +### Phase 4: Spec and record + +**Acceptance:** +- **A11.** `docs/language_specification/variable_scoping.md` is rewritten around N1–N7: each rule's example executed and printing something else with its rule off; an `error` block per refusal; the F1, F2, R-JJ and SPY0618 texts gone; touched files drained (R-BG). `variable_declaration.md` § Bare Declarations beside it states D7, and the 22 other declarations get a value or move into a body. `docs/deviations.yaml`: `class-body-bare-name-read` is N1 and N2's text. `docs/design/name-resolution.md`: the *Today* notes of N1, N2 and N4 go, and it and `docs/design/gap-discovery-contracts.md` name the table. #2426's other open items are fixed or marked pending with their issue. `check_spec_blocks.sh` green +- **A12.** `regen: no diff` after T1 and T4, for spy-stdlib C#, spy-test C# and `.expected.cs`; `FrontEndParityTests` green +- Allowlists drain, each row in the commit that turns it green: every #2423, #2398 and #2432 row of both; both scorecard baselines lowered with `--lower` + +#### Tasks + +- **T11. Spec and record** — A11's files. (A11) + +## Testing Strategy + +- Fixtures: one `.spy` + `.expected` per rule and one `.error` per refusal code and D4 phrase, each with its running control. + +## Issues to Close + +- #2423 — closed by T1–T9, T12; **close criterion:** A1–A8, A13 @ sha, 0 rows citing it in either allowlist +- #2398 — closed by T5, T9, T10; **close criterion:** A6 and A10 @ sha +- #2432 — closed by T10; **close criterion:** A9 and A14 @ sha, on the hosts S0b generates: the SPY0401 verdict (owner); the constants are #2768's, the other hosts #2779's +- #2426 — closed by T11; **close criterion:** A11 @ sha + +## Class trackers this plan may post cells to + +- #2427 (the principle), #2457 (the harness's residue) +- #2486 — the rule tables; #2487 stays open: ruling 6 lists its remainder +- #2397, #2417, #2069, #2147, #2249, #2277, #2383, #2768, #2769, #2772, #2779 — neighbours + +## Revision log + +- @ 8bd4b49fc — revised before the first pass: stage 0, D10, #2432's close. +- @ a7fbd945d — revised after the 1st pass (NEEDS REVISION, Dimension 6): S0b's seven axes; D2. +- @ 656991807 — revised after the 2nd pass (NEEDS REVISION, Dimension 6): member kinds, the reader census; D8 per bound name. Deferred (owner): D10's module-level judgement ← the pipeline order — fix: judge the target once every type and import is declared — proved by the `dotted` and `Later` must-run cells. +- @ 56dbb009f — revised after the 3rd pass (NEEDS REVISION, Dimension 6): stage 0: spelling and placement, module functions, probes; D8's attribute scope; A14. +- @ 73c785856 — revised after the 4th pass (NEEDS REVISION, Dimension 4 and 6): stage 0 with D8's decimal constant and D4's lambda default; builtin names; ruling 6 (findings 1, 3–5). Finding 2 left the plan by the owner's decision (#2423 comment 7050154806): #2779. +- @ 5e2156981 — fix round after the independent review (rulings 26–29); D9's S0b clause cut (in stage 0). diff --git a/src/Sharpy.Compiler.Tests/Conformance/CiFilterCoverageConformanceTests.cs b/src/Sharpy.Compiler.Tests/Conformance/CiFilterCoverageConformanceTests.cs index 9ba2a426e..fd4046c3b 100644 --- a/src/Sharpy.Compiler.Tests/Conformance/CiFilterCoverageConformanceTests.cs +++ b/src/Sharpy.Compiler.Tests/Conformance/CiFilterCoverageConformanceTests.cs @@ -107,7 +107,7 @@ public void EverySweep_IsSelectedByExactlyOneStep() /// a required oracle on the runner image's python is a verdict at an unpinned minor. Two judged sets, one rule: /// /// a Compiler.Tests step is judged when its filter selects a class reaching the oracle - /// (, this assembly's call graph). The three sweep classes are pinned, so a scan + /// (, this assembly's call graph). The four sweep classes are pinned, so a scan /// that misses a direct caller is red, and so are two classes it must not name: one reads a repo file through /// and one calls the other gate, TestPreconditions.RequireOrSkip; /// another test project's assembly is not loaded here, so it is judged per project: when its sources call a @@ -127,6 +127,7 @@ public void EveryPythonOracleTest_RunsWithTheOracleRequired() Assert.Contains("Sharpy.Compiler.Tests.Properties.Differential.DifferentialExecutionTests", oracleClasses); Assert.Contains("Sharpy.Compiler.Tests.Properties.Differential.FormatSpecDifferentialTests", oracleClasses); Assert.Contains("Sharpy.Compiler.Tests.Conformance.NameResolutionDifferentialTests", oracleClasses); + Assert.Contains("Sharpy.Compiler.Tests.Conformance.ScopeMeaningDifferentialTests", oracleClasses); Assert.DoesNotContain("Sharpy.Compiler.Tests.Conformance.PythonOracleSkipCensusTests", oracleClasses); Assert.DoesNotContain("Sharpy.Compiler.Tests.RuntimeClosureResolverTests", oracleClasses); @@ -353,9 +354,10 @@ public void Evaluator_ResolvesMatrixAndEnv_AndRefusesWhatItCannotRead() return (steps, ReflectTests()); } - /// The seven sweeps COMPILER_MAIN_FILTER excludes today (measured). A literal, so that a shrinking - /// universe is red rather than a smaller check. - private const int MinimumSweeps = 7; + /// The eight sweeps COMPILER_MAIN_FILTER excludes today (measured; the eighth is the scope-meaning + /// differential, whose one silent test must not run under a shard's hang limit: #2423 comment 7052893050, item 27). A + /// literal, so that a shrinking universe is red rather than a smaller check. + private const int MinimumSweeps = 8; /// Just below the 84 test methods measured when this fact was written, exemptions aside. A literal, so that /// sweep names matching nothing are red. @@ -368,9 +370,9 @@ public void Evaluator_ResolvesMatrixAndEnv_AndRefusesWhatItCannotRead() /// written. A literal, so that a step list this fact stopped judging is red. private const int MinimumJudgedSteps = 10; - /// The five steps of sweeps-quick carry a step-level if: today (measured). A literal, so that a + /// The six steps of sweeps-quick carry a step-level if: today (measured). A literal, so that a /// parser reading no if: is red. - private const int MinimumConditionedSteps = 5; + private const int MinimumConditionedSteps = 6; /// The closed set of if: a judged step or job may carry: the one spelling on them today. It runs the /// step whenever the job is not cancelled and its build output unpacked, so an earlier sweep's red does not skip it. diff --git a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Axes.cs b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Axes.cs index 378e21e40..5a9206707 100644 --- a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Axes.cs +++ b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Axes.cs @@ -170,7 +170,7 @@ string Program(bool twin) var expected = Run(python, 5, first ? "N1" : "N1-nesting"); return new NameCell { - Id = CellId("read", "comprehension", family, shape, slot, nesting, order), + Key = CellId("read", "comprehension", family, shape, slot, nesting, order), Family = Family.Read, Source = Program(twin: false), TwinSource = family == "dict-spread-comprehension" ? Program(twin: true) : null, @@ -239,7 +239,7 @@ string Program(bool twin) var moduleOuter = outer == BindingKind.ModuleVar; return new NameCell { - Id = CellId("store", "walrus-in-comprehension", family, shape, slot, $"outer={outer}"), + Key = CellId("store", "walrus-in-comprehension", family, shape, slot, $"outer={outer}"), Family = Family.Store, Source = Program(twin: false), TwinSource = family == "dict-spread-comprehension" ? Program(twin: true) : null, @@ -440,7 +440,7 @@ void Helper(string read) var expected = Cycle(PyOutcome.Name(python), "N3-cycle"); return new NameCell { - Id = CellId("read", "cycle", spelling, pair, through, a, b), + Key = CellId("read", "cycle", spelling, pair, through, a, b), Family = Family.Read, Source = Join(lines) + MainBlock($"print({print})"), Tag = expected.Tag, @@ -505,7 +505,7 @@ private static NameCell OrderObservationCell(BindingKind kind, Order order) var model = instance ? JoinOut("main", $"init {kind}", value) : JoinOut($"init {kind}", "main", value); return new NameCell { - Id = CellId("read", "order-observation", kind, order), + Key = CellId("read", "order-observation", kind, order), Family = Family.Read, Source = Program(decl), TwinSource = instance ? Program(twinDecl) : null, @@ -801,7 +801,7 @@ private static NameCell SiblingNestedTypeCell(Spelling spelling, ReadPosition po : Run(method ? PyOutcome.Ran(Value) : PyOutcome.Name("O"), Value, "N7"); return new NameCell { - Id = CellId("read", "sibling", spelling, position, order), + Key = CellId("read", "sibling", spelling, position, order), Family = Family.Read, Source = Join(new[] { "class O:" }.Concat(body)) + MainBlock(method ? "print(O.J().r())" : "print(O.J.r)"), Tag = expected.Tag, @@ -879,7 +879,7 @@ private static IEnumerable AliasTypePositionCells() string Program(string reader, string[] main) => (order == Order.Earlier ? r.Target + Alias + reader : reader + r.Target + Alias) + MainBlock(main); yield return new NameCell { - Id = CellId("read", "type-position-alias", r.Label, order), + Key = CellId("read", "type-position-alias", r.Label, order), Family = Family.Read, Source = Program(r.Reader, r.Main), TwinSource = r.Twin == null ? null : Program(r.Twin, r.TwinMain ?? r.Main), @@ -906,7 +906,7 @@ private static IEnumerable ResultValueFormCells() const string Reads = "print(r().unwrap())"; yield return new NameCell { - Id = CellId("read", "result-form", ResultValueForm.BareValue, order), + Key = CellId("read", "result-form", ResultValueForm.BareValue, order), Family = Family.Read, Source = Program("def r() -> int !Later:\n return Later().v\n", Reads), TwinSource = Program("def r() -> int:\n return Later().v\n", "print(r())"), @@ -921,7 +921,7 @@ private static IEnumerable ResultValueFormCells() yield return new NameCell { - Id = CellId("read", "result-form", ResultValueForm.Err, order), + Key = CellId("read", "result-form", ResultValueForm.Err, order), Family = Family.Read, Source = (order == Order.Earlier ? LaterError + "def r() -> int !Later:\n return Err(Later())\n" : "def r() -> int !Later:\n return Err(Later())\n" + LaterError) + MainBlock("match r():", " case Ok(v):", " print(v)", " case Err(e):", " print(\"err\")"), @@ -1011,7 +1011,7 @@ private static NameCell DeclarationCell(DeclarationShapes shape, StoreSpelling s var (host, call) = Host(body, stmts); return new NameCell { - Id = CellId("store", "declaration", shape, s, body), + Key = CellId("store", "declaration", shape, s, body), Family = Family.Store, Source = Join(module.Concat(host)) + MainBlock(call.Concat(later).ToArray()), Tag = e.Tag, @@ -1104,7 +1104,7 @@ private static NameCell StructHostCell(BindingKind target, ReadPosition body, Ne var refused = spelling == Spelling.SelfDot && closure && target is not (BindingKind.StaticField or BindingKind.StaticMethod); return cell with { - Id = CellId("read", "struct", target, body, nesting == Nesting.Direct ? null : nesting, order, spelling), + Key = CellId("read", "struct", target, body, nesting == Nesting.Direct ? null : nesting, order, spelling), Tag = refused ? SharpyTag.MustRefuse : cell.Tag, Model = refused ? null : cell.Model, Rule = refused ? "R-KT" : cell.Rule, @@ -1225,7 +1225,7 @@ private static NameCell AttributeStoreCell(AttributeReceiver receiver, BindingKi return new NameCell { - Id = CellId("store", "attribute", receiver, member, form, body), + Key = CellId("store", "attribute", receiver, member, form, body), Family = Family.Store, Source = WithHelpers(Join(lines) + MainBlock(call.ToArray())), Tag = expected.Tag, @@ -1357,7 +1357,7 @@ private static NameCell AugmentedInitCell(string host, StoreNesting position, Au return new NameCell { - Id = CellId(new object?[] { "store", "attribute", "augmented", host, body, position }.Concat(spelled).Append(tuple ? null : slots).ToArray()), + Key = CellId(new object?[] { "store", "attribute", "augmented", host, body, position }.Concat(spelled).Append(tuple ? null : slots).ToArray()), Family = Family.Store, Source = Join(lines2) + MainBlock(call), Tag = expected.Tag, diff --git a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Census.cs b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Census.cs index 63b6eae9f..370892498 100644 --- a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Census.cs +++ b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Census.cs @@ -31,20 +31,20 @@ public partial class NameResolutionDifferentialTests [(Family.Read, SharpyTag.MustRefuse, "R-KG")] = 15, [(Family.Read, SharpyTag.MustRefuse, "R-KT")] = 12, [(Family.Read, SharpyTag.MustRefuse, "R1(b)")] = 45, - [(Family.Read, SharpyTag.MustRefuse, "SPY0401")] = 460, + [(Family.Read, SharpyTag.MustRefuse, "SPY0401")] = 453, [(Family.Read, SharpyTag.MustRefuse, "kind:SPY0212")] = 4, [(Family.Read, SharpyTag.MustRefuse, "kind:SPY0290")] = 302, - [(Family.Read, SharpyTag.MustRefuse, "kind:enum-member-constant")] = 16, + [(Family.Read, SharpyTag.MustRefuse, "kind:enum-member-constant")] = 14, [(Family.Read, SharpyTag.MustRefuse, "kind:instance-at-initializer")] = 803, [(Family.Read, SharpyTag.MustRefuse, "kind:result-wrap")] = 2, [(Family.Read, SharpyTag.MustRefuseOrThrow, "N3-cycle")] = 193, [(Family.Read, SharpyTag.MustRun, "A3")] = 32, - [(Family.Read, SharpyTag.MustRun, "N1")] = 926, + [(Family.Read, SharpyTag.MustRun, "N1")] = 930, [(Family.Read, SharpyTag.MustRun, "N1+N3")] = 81, [(Family.Read, SharpyTag.MustRun, "N1-innermost")] = 189, [(Family.Read, SharpyTag.MustRun, "N1-nesting")] = 148, - [(Family.Read, SharpyTag.MustRun, "N3")] = 105, - [(Family.Read, SharpyTag.MustRun, "N7")] = 917, + [(Family.Read, SharpyTag.MustRun, "N3")] = 109, + [(Family.Read, SharpyTag.MustRun, "N7")] = 918, [(Family.Read, SharpyTag.MustRun, "R-Y")] = 410, [(Family.Seed, SharpyTag.MayRefuse, "seed")] = 1, [(Family.Seed, SharpyTag.MustRefuse, "seed")] = 62, diff --git a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Checks.cs b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Checks.cs index b79cd4488..b1bc2b243 100644 --- a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Checks.cs +++ b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Checks.cs @@ -608,7 +608,7 @@ public void ModelPairing_TheLaterOrderPrintsWhatTheEarlierOrderPrints() // coverage claim on the models: most of them python or Sharpy reads as well, and the sweep's judgedPairsReadByNothingElse says how many the pairing alone holds. judged.Count.Should().BeGreaterThanOrEqualTo(1000, "D3.2's floor, ahead of the literal so that it can be the assertion that fails"); pairs.Should().Be(1741); - judged.Count.Should().Be(1276); + judged.Count.Should().Be(1280); } /// Why no check reads a model, each a key of . @@ -778,160 +778,20 @@ public void PatternKindRoster_EveryNote_HasAFalsifier() } // ------------------------------------------------------------------------------------------- // - // D3.4: a rule's cite is an axis predicate + // D3.4: a rule's cite is a row of the rule table (NameResolutionDifferentialTests.RuleTable.cs) // ------------------------------------------------------------------------------------------- // - private static bool IsTypeLevel(BindingKind k) => NameResolutionRosters.TypeLevelKinds.Contains(k); - - private static bool IsInstanceLevel(BindingKind k) => NameResolutionRosters.InstanceKinds.Contains(k); - private static bool IsModuleKind(BindingKind k) => NameResolutionRosters.ModuleLevelKinds.Contains(k); private static bool IsPositionLocal(BindingKind k) => NameResolutionRosters.PositionLocalKinds.Contains(k); private static bool IsNamedOuter(BindingKind k) => k is BindingKind.Builtin or BindingKind.ImportedName; - private static bool IsVisibleModuleOuter(BindingKind k) => IsModuleKind(k) || IsNamedOuter(k); - - /// A segment of the cell's id: the order and spelling tokens the generator writes there and no property carries. - private static bool Spelled(NameCell c, string token) => c.Id.Split('/').Contains(token); - - private static bool ThroughAMember(NameCell c) => Spelled(c, nameof(Spelling.Qualified)) || Spelled(c, nameof(Spelling.Alias)) || Spelled(c, nameof(Spelling.SelfDot)) - || c.Id.Contains("/base/H.x", StringComparison.Ordinal) || c.Id.Contains("/base/B.x", StringComparison.Ordinal) || c.Id.Contains("/base/self.x", StringComparison.Ordinal); - - private static bool Nested(NameCell c) => Spelled(c, nameof(Nesting.Lambda)) || Spelled(c, nameof(Nesting.ComprehensionIterable)) || Spelled(c, nameof(Nesting.ComprehensionElement)); - - /// READ's module-level split: a read at load time at the later order is N3's. The nesting is the id's token, the one place the cell keeps it. - private static bool ModuleReadAtLoadLater(NameCell c) => Spelled(c, nameof(Order.Later)) && c.Position is ReadPosition p - && ModuleReadAtLoad(p, Spelled(c, nameof(Nesting.Lambda)) ? Nesting.Lambda : Spelled(c, nameof(Nesting.ComprehensionIterable)) ? Nesting.ComprehensionIterable : Spelled(c, nameof(Nesting.ComprehensionElement)) ? Nesting.ComprehensionElement : Nesting.Direct); - - /// A class body's bare read that sees the member: an initializer at the earlier order (the later order is N2's, or N1+N3's with no outer). - private static bool ClassBodySeesTheMember(NameCell c) => c.Relation == DeclaringRelation.Self && Spelled(c, nameof(Order.Earlier)) && c.Position is ReadPosition p && IsInitializer(p); - - /// A position evaluated while the program loads, so a read can see a value before it is ready. - private static bool AtLoad(NameCell c) => c.Position is ReadPosition.ModuleInitializer or ReadPosition.ModulePropertyInitializer - or ReadPosition.StaticInitializer or ReadPosition.ConstInitializer or ReadPosition.StaticPropertyDefault; - - /// D3.4: what each rule says, as a predicate on the axes of the cell citing it, so a rule retagged to one admitting the same codes is red here and not only in the census. - /// Every rule in the pool has an entry and every entry has a cell. The tag is on the axes: MustRun and MustRefuse under one rule are its two arms. - internal static readonly IReadOnlyDictionary> RuleAxes = new Dictionary>(StringComparer.Ordinal) - { - // N1: the innermost binding that means the read. - ["N1"] = c => c.Tag == SharpyTag.MustRun && (c.Family == Family.Read - ? !IsPositionLocal(c.Outer) && !ThroughAMember(c) && !(c.Position == ReadPosition.ModuleInitializer && Nested(c) && !Spelled(c, nameof(Nesting.Lambda))) - && (IsTypeLevel(c.Target) ? ClassBodySeesTheMember(c) || c.Relation == DeclaringRelation.Enclosing : !ModuleReadAtLoadLater(c)) - : c.Family == Family.Local && c.Construct == LocalTarget.Comprehension), - ["N1+N3"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRun && IsTypeLevel(c.Target) && c.Outer == BindingKind.None - && (Spelled(c, nameof(Order.Later)) || c.Relation == DeclaringRelation.Other), - ["N1-arity"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && c.Outer == BindingKind.Builtin && Spelled(c, "arity-mismatch") && !Spelled(c, "int"), - ["N1-innermost"] = c => c.Tag == SharpyTag.MustRun && (c.Family == Family.Read ? IsLocalOuter(c.Outer) : c.Family == Family.Local && IsPositionLocal(c.Target) && !Spelled(c, "let-in")), - ["N1-methods"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && c.Outer == BindingKind.None && (IsTypeLevel(c.Target) || IsInstanceLevel(c.Target)) - && Spelled(c, nameof(Spelling.Bare)) && c.Relation is DeclaringRelation.Self or DeclaringRelation.Sibling, - ["N1-nesting"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRun && IsModuleKind(c.Target) && c.Outer == BindingKind.None - && (c.Position == ReadPosition.ComprehensionElement ? c.Id.StartsWith("read/comprehension/", StringComparison.Ordinal) : c.Position == ReadPosition.ModuleInitializer && Nested(c)), - // The read reaches the outer, and the read is ill-typed. A class body that sees its own later member is N2's, and any binding or import under a builtin's name read at load is N2-module's. - ["N1-type-error"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && IsVisibleModuleOuter(c.Outer) && !ThroughAMember(c) - && !Spelled(c, "arity-mismatch") && !Spelled(c, "arity-match") - && (!IsModuleKind(c.Target) || (c.Outer == BindingKind.Builtin && c.Target != BindingKind.ModuleDef && !ModuleReadAtLoadLater(c))) - && (!IsTypeLevel(c.Target) || c.Relation != DeclaringRelation.Self || Spelled(c, nameof(Order.Earlier)) || Nested(c) || c.Position is not ReadPosition p || !IsInitializer(p)), - - // N2: a class body's read of an outer name it later declares. - ["N2"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && IsTypeLevel(c.Target) && IsVisibleModuleOuter(c.Outer) && c.Position is ReadPosition p && IsInitializer(p) - && !Spelled(c, nameof(Order.Earlier)), - ["N2-module"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && IsModuleKind(c.Target) && IsNamedOuter(c.Outer) && Spelled(c, nameof(Order.Later)) && !Spelled(c, "arity-mismatch"), - - // N3: the later order prints what the earlier prints, and a cycle has no order to print. - ["N3"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRun && c.Outer == BindingKind.None - && (c.Id.StartsWith("read/order-observation/", StringComparison.Ordinal) || (IsModuleKind(c.Target) && (ModuleReadAtLoadLater(c) || c.Id.StartsWith("read/str/", StringComparison.Ordinal)))), - ["N3-cycle"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuseOrThrow && c.Outer == BindingKind.None && AtLoad(c), - - // N5: a local is visible from its binding, in its block. - ["N5"] = c => c.Family == Family.Local - ? c.Tag == SharpyTag.MustRun - ? c.Outer == BindingKind.None || (c.Outer == BindingKind.ModuleVar && Spelled(c, "inside")) - : c.Tag == SharpyTag.MustRefuse && !Spelled(c, "self") && (c.Outer == BindingKind.None || IsTypeLevel(c.Outer)) - : c.Family == Family.Store && !IsAttributeStore(c) && c.Declaration == null && (c.Outer is BindingKind.None or BindingKind.Builtin - ), - ["N5-block-scope"] = c => c.Family == Family.Local && c.Tag == SharpyTag.MustRun && Spelled(c, "let-in") && c.Outer != BindingKind.None, - ["N5-declared-later"] = c => c.Family == Family.Local && c.Tag == SharpyTag.MustRefuse && IsPositionLocal(c.Target) && c.Target != BindingKind.LocalDef - && (Spelled(c, "above") || Spelled(c, "L28") || c.Timing is ReadTimings.SameBlockAbove or ReadTimings.BackEdge), - ["N5-self"] = c => c.Family == Family.Local && c.Tag == SharpyTag.MustRefuse && c.Target == BindingKind.LambdaTypedLocal && Spelled(c, "self"), - - // N6: a store over a binding reaches it only through a declaration, and a declaration needs one it can write. - ["N6"] = c => c.Family == Family.Store && c.Deviation == null && c.Form is StoreForm.Assign or StoreForm.Augmented or StoreForm.Walrus - && (c.Outer is BindingKind.ModuleVar or BindingKind.ModuleProperty or BindingKind.EnclosingLocal || IsNamedOuter(c.Outer)) - && (c.Tag == SharpyTag.MustRun) == (Spelled(c, "global") || Spelled(c, "nonlocal") || c.Declaration != null), - ["N6-declaration"] = c => c.Family == Family.Store && c.Tag == SharpyTag.MustRefuse && c.Declaration != null, - ["N6-same-function"] = c => c.Family == Family.Store && c.Tag == SharpyTag.MustRun && c.Outer == BindingKind.LocalVar && c.Target == BindingKind.LocalVar, - ["N6-type-kind"] = c => c.Family == Family.Store && c.Tag == SharpyTag.MustRefuse && IsNonWritableByMeaning(c.Outer), - - // N7: a member through a spelling that names its owner. - ["N7"] = c => c.Tag == SharpyTag.MustRun && (c.Family == Family.Read - ? ThroughAMember(c) || Spelled(c, nameof(Spelling.Call)) || Spelled(c, "GenericReceiver") || (c.TypeAt != null && c.Target == BindingKind.ModuleTypeAlias) - || (c.Id.StartsWith("read/str/", StringComparison.Ordinal) && IsTypeLevel(c.Target)) - : c.Family == Family.Store && IsAttributeStore(c) && c.Form is StoreForm.Assign or StoreForm.Augmented), - - ["#1974"] = c => c.Tag == SharpyTag.MustRun && (c.Family == Family.Store ? c.Form == StoreForm.LetOrVar - : c.Family == Family.Local && c.Outer == BindingKind.LocalVar && Spelled(c, "let-in")), - ["A3"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRun && c.Relation == DeclaringRelation.Base && Spelled(c, nameof(Spelling.Bare)) && IsModuleKind(c.Outer), - ["P52"] = c => c.Family == Family.TypeMember && c.Tag == SharpyTag.MustRun && c.Outer == BindingKind.None && IsModuleKind(c.Target), - ["R-BM"] = c => c.Tag == SharpyTag.MustRun && (c.Family == Family.Store ? c.Form == StoreForm.OutLet : c.Family == Family.Local && c.Construct == LocalTarget.OutLet), - ["R-KG"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && IsTypeLevel(c.Target) && c.Outer == BindingKind.None && c.Relation == DeclaringRelation.Enclosing && Spelled(c, nameof(Spelling.Bare)), - // R-KT's closure over a struct's `self`. A @static member reached through self needs no `this`, so both keep the class arm (the lead's ruling on axis 7). - ["R-KT"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && c.Id.StartsWith("read/struct/", StringComparison.Ordinal) && Spelled(c, nameof(Spelling.SelfDot)) - && IsInstanceLevel(c.Target) && (Spelled(c, nameof(Nesting.Lambda)) || (c.Position is ReadPosition closure && NameResolutionRosters.StructClosureBodies.Contains(closure))), - // R-KU: a @static store through what is not its owner's name. - ["R-KU"] = c => c.Family == Family.Store && c.Tag == SharpyTag.MustRefuse && IsAttributeStore(c) && c.Target is BindingKind.StaticField or BindingKind.StaticProperty - && (Spelled(c, nameof(AttributeReceiver.SelfDot)) || Spelled(c, nameof(AttributeReceiver.DerivedType)) || Spelled(c, nameof(AttributeReceiver.InstanceLocal))), - ["R-Y"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRun && c.Relation == DeclaringRelation.Self && (IsTypeLevel(c.Target) || IsInstanceLevel(c.Target)) - && IsVisibleModuleOuter(c.Outer) && Spelled(c, nameof(Spelling.Bare)), - ["R1(b)"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && c.Relation == DeclaringRelation.Base && c.Outer == BindingKind.None && Spelled(c, nameof(Spelling.Bare)), - - // S2 / S3: a read past a binding's own visibility, over an outer name that must not silently answer it. - ["S2"] = c => c.Family == Family.Local && c.Tag == SharpyTag.MustRefuse && c.Target == BindingKind.LocalVar && c.Construct != null && c.Outer != BindingKind.None, - // The owner's ruling on a comprehension's walrus over a visible module name read after it (2026-11-06). - ["S2-walrus"] = c => c.Family == Family.Store && c.Tag == SharpyTag.MustRefuse && c.Form == StoreForm.Walrus && c.Outer == BindingKind.ModuleVar && c.Deviation == "walrus-in-comprehension-scope", - ["S3"] = c => c.Family == Family.Local && c.Tag == SharpyTag.MustRefuse && c.Target == BindingKind.LocalDef && Spelled(c, "above"), - - ["SPY0401"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && c.Position is ReadPosition p && IsConstantOnly(p), - ["SPY0606"] = c => c.Family == Family.Store && c.Tag == SharpyTag.MustRefuse && IsTypeLevelMember(c.Outer) && !IsAttributeStore(c), - - ["kind:SPY0212"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && c.Outer == BindingKind.Builtin && c.Target == BindingKind.ModuleClass && Spelled(c, "int"), - // A const target, or a tuple of attribute targets under an augmented operator (python's SyntaxError, P85). - ["kind:SPY0225"] = c => c.Family == Family.Store && c.Tag == SharpyTag.MustRefuse - && (c.Target is BindingKind.ModuleLiteralConst or BindingKind.ModuleComputedConst or BindingKind.ClassLiteralConst or BindingKind.ClassComputedConst - || (IsAttributeStore(c) && c.Form == StoreForm.Augmented && c.Shape == "TupleLiteral")), - ["kind:SPY0290"] = c => c.Tag == SharpyTag.MustRefuse && IsInstanceLevel(c.Target) && (c.Family == Family.Read - ? !Spelled(c, nameof(Spelling.SelfDot)) && (ThroughAMember(c) || Spelled(c, nameof(Spelling.Call))) - : c.Family == Family.Store && IsAttributeStore(c) && (Spelled(c, nameof(AttributeReceiver.TypeName)) || Spelled(c, nameof(AttributeReceiver.Alias)) || Spelled(c, nameof(AttributeReceiver.DerivedType)))), - ["kind:SPY0340"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MayRefuse && c.Target == BindingKind.ModuleLet, - ["kind:SPY0606"] = c => c.Family == Family.Store && c.Tag == SharpyTag.MustRefuse && IsAttributeStore(c) && c.Target is BindingKind.StaticMethod or BindingKind.InstanceMethod, - ["kind:enum-member-constant"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && c.Position == ReadPosition.EnumMemberValue, - ["kind:instance-at-initializer"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && IsInstanceLevel(c.Target) && Spelled(c, nameof(Spelling.Bare)) && c.Position is ReadPosition p && IsInitializer(p), - ["kind:result-wrap"] = c => c.Family == Family.Read && c.Tag == SharpyTag.MustRefuse && c.TypeAt == TypePosition.ResultError, - - ["seed"] = c => c.Family == Family.Seed && c.Id.StartsWith("seed/", StringComparison.Ordinal), - ["unruled:global-creates-binding"] = c => c.Tag == SharpyTag.Unruled && UnruledAxesHold(c), - }; - - internal static bool RuleAxesHold(NameCell c) => RuleAxes.TryGetValue(c.Rule, out var axes) && axes(c); - private static bool RefusalIsAnOutcome(NameCell c) => c.Tag is SharpyTag.MustRefuse or SharpyTag.MustRefuseOrThrow or SharpyTag.MayRefuse; - /// D3.4's three directions: a cell's rule has a predicate and the cell is on its axes, a predicate has a cell, and a rule a refusal could answer to says which codes it admits. A seed carries its own. - internal static IEnumerable RuleAxesFailures(IReadOnlyList pool) + /// A rule a refusal could answer to says which codes it admits, and an entry has such a cell. A seed carries its own. + internal static IEnumerable AdmittedRuleFailures(IReadOnlyList pool) { - foreach (var rule in pool.Select(c => c.Rule).Distinct(StringComparer.Ordinal).Where(r => !RuleAxes.ContainsKey(r))) - yield return $"RuleAxes: rule {rule} is cited and has no predicate"; - foreach (var rule in RuleAxes.Keys.Where(r => pool.All(c => c.Rule != r))) - yield return $"RuleAxes: the predicate for {rule} is carried by no cell"; - - var off = pool.Where(c => RuleAxes.ContainsKey(c.Rule) && !RuleAxesHold(c)).ToList(); - foreach (var c in off.Take(40)) - yield return $"RuleAxes: {c.Id} cites {c.Rule} and its axes are not that rule's (tag {c.Tag}, target {c.Target}, outer {c.Outer}, position {c.Position})"; - if (off.Count > 40) - yield return $"RuleAxes: … {off.Count} cells off their rule's axes in total: {string.Join(", ", off.GroupBy(c => c.Rule).Select(g => $"{g.Key} {g.Count()}"))}"; - var refusing = pool.Where(RefusalIsAnOutcome).ToList(); foreach (var rule in refusing.Where(c => c.SeedRefusalCodes == null).Select(c => c.Rule).Distinct(StringComparer.Ordinal).Where(r => !AdmittedRefusals.ContainsKey(r))) yield return $"AdmittedRefusals: rule {rule} is carried by a cell a refusal could answer and has no entry"; @@ -940,19 +800,19 @@ internal static IEnumerable RuleAxesFailures(IReadOnlyList poo } [Fact] - public void RuleAxes_EveryCiteIsOnItsRulesAxes() + public void RuleTable_EveryCellHasOneRow_AndEveryRowACell() { - var pool = GeneratedCells(); - AssertNoProblems(RuleAxesFailures(pool), "a rule's cite is a claim about the cell's axes, and a refusal under it says which codes it admits"); + if (Environment.GetEnvironmentVariable(RuleTableDumpEnv) is { Length: > 0 } dump) + DumpRuleTableAxes(dump); - // The retag the census alone used to see: if all of a rule's cells fit another rule's predicate, moving them there moves no axis. - var hidden = pool.GroupBy(c => c.Rule, StringComparer.Ordinal) - .SelectMany(q => RuleAxes.Where(r => r.Key != q.Key && q.All(r.Value)).Select(r => $"every cell of {q.Key} fits {r.Key}'s predicate")) - .ToList(); - AssertNoProblems(hidden, "two rules that cannot be told apart by their axes are one rule, or a loose predicate"); + var pool = GeneratedCells(); + AssertNoProblems(RuleTableFailures(pool).Concat(AdmittedRuleFailures(pool)), + "a cell's tag and rule are its one row's, a row no cell matches rules nothing, and a refusal under a rule says which codes it admits"); - // Measured literals: a generator that stopped citing a rule would otherwise pass an emptier check. - RuleAxes.Should().HaveCount(44); + // Measured literals: a table or a generator that stopped citing a rule would otherwise pass an emptier check. 44 rules of this + // pool, and the eight only ScopeMeaningDifferentialTests has cells for (R-QI, N1-typed-read, N4, #1938, SPY0425, kind:SPY0336, + // N1-alias-target, #2769). + RuleTable().Select(r => r.Rule).Distinct(StringComparer.Ordinal).Should().HaveCount(52); // 29 rules with an entry, and the seeds', which carry their own codes. pool.Where(RefusalIsAnOutcome).Select(c => c.Rule).Distinct(StringComparer.Ordinal).Should().HaveCount(30); } diff --git a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Families.cs b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Families.cs index c129b0e85..377c111bf 100644 --- a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Families.cs +++ b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Families.cs @@ -251,7 +251,7 @@ private static NameCell ModuleStoreCell(StoreSpelling s, BindingKind outer, Read var expected = ExpectStore(s, outer, declared, outerValue, reads); return new NameCell { - Id = CellId("store", s, $"outer={outer}", body, declared ? "global" : "no-decl", order, laterRead ? "later-read" : "no-read", insideIf ? "inside-if" : null), + Key = CellId("store", s, $"outer={outer}", body, declared ? "global" : "no-decl", order, laterRead ? "later-read" : "no-read", insideIf ? "inside-if" : null), Family = Family.Store, Source = WithHelpers(Join(lines) + MainBlock(main.ToArray())), Tag = expected.Tag, @@ -294,7 +294,7 @@ private static NameCell EnclosingStoreCell(StoreSpelling s, ReadPosition body, b var expected = ExpectStore(s, BindingKind.EnclosingLocal, declared, 13, laterRead: true); return new NameCell { - Id = CellId("store", s, "outer=EnclosingLocal", body, declared ? "nonlocal" : "no-decl", insideIf ? "inside-if" : null), + Key = CellId("store", s, "outer=EnclosingLocal", body, declared ? "nonlocal" : "no-decl", insideIf ? "inside-if" : null), Family = Family.Store, Source = WithHelpers(Join(lines) + MainBlock(call.ToArray())), Tag = expected.Tag, @@ -321,7 +321,7 @@ private static NameCell SameFunctionStoreCell(StoreSpelling s, ReadPosition body int value = s == StoreSpelling.Augmented ? 14 : 15; return new NameCell { - Id = CellId("store", s, "outer=LocalVar", body, enclosingBlock ? "enclosing-block" : "same-block"), + Key = CellId("store", s, "outer=LocalVar", body, enclosingBlock ? "enclosing-block" : "same-block"), Family = Family.Store, Source = WithHelpers(Join(host) + MainBlock(call.ToArray())), Tag = SharpyTag.MustRun, @@ -431,7 +431,7 @@ private static IEnumerable GlobalCreatesBindingCells() var main = new List(call) { "print(y)" }; yield return new NameCell { - Id = CellId("store", "declaration", "global-creates-binding", s, body), + Key = CellId("store", "declaration", "global-creates-binding", s, body), Family = Family.Store, Source = Join(host) + MainBlock(main.ToArray()), Tag = SharpyTag.Unruled, @@ -459,7 +459,7 @@ private static NameCell LambdaWalrusCell(BindingKind outer) var value = enclosing ? 13 : 5; return new NameCell { - Id = CellId("store", "lambda-walrus", $"outer={outer}"), + Key = CellId("store", "lambda-walrus", $"outer={outer}"), Family = Family.Store, Source = Join(lines) + MainBlock(call.ToArray()), Tag = SharpyTag.MustRefuse, @@ -480,7 +480,7 @@ private static NameCell WalrusInComprehensionCell(ReadPosition body, BindingKind var moduleOuter = outer == BindingKind.ModuleVar; return new NameCell { - Id = CellId("store", "walrus-in-comprehension", $"outer={outer}", body), + Key = CellId("store", "walrus-in-comprehension", $"outer={outer}", body), Family = Family.Store, Source = Join(lines) + MainBlock(call.ToArray()), Tag = SharpyTag.MustRefuse, @@ -500,7 +500,7 @@ private static IEnumerable BuiltinStoreCells() { NameCell Cell(string label, IReadOnlyList lines, string[] main, Expected e, StoreForm form) => new() { - Id = CellId("store", "builtin", label, name), + Key = CellId("store", "builtin", label, name), Family = Family.Store, Source = Join(lines) + MainBlock(main), Tag = e.Tag, @@ -614,7 +614,7 @@ private static NameCell TypeMemberCell(string label, IEnumerable decl, I : supportText + mainBlock + declText; return new NameCell { - Id = CellId("typemember", kind, label, order == Order.Earlier ? "before" : "after"), + Key = CellId("typemember", kind, label, order == Order.Earlier ? "before" : "after"), Family = Family.TypeMember, Source = source, Tag = SharpyTag.MustRun, @@ -762,7 +762,7 @@ private static List LocalDecl(BindingKind k, ReadName n) } } - private static NameCell LocalProgram(string id, BindingKind binding, BindingKind outer, ReadPosition body, IReadOnlyList stmts, Expected e, string? shape, ReadName n, LocalTarget? construct = null) + private static NameCell LocalProgram(CellKey id, BindingKind binding, BindingKind outer, ReadPosition body, IReadOnlyList stmts, Expected e, string? shape, ReadName n, LocalTarget? construct = null) { var members = outer is BindingKind.StaticMethod or BindingKind.StaticField ? MemberDecl(outer, n) : new List(); var effectiveBody = stmts; @@ -786,7 +786,7 @@ private static NameCell LocalProgram(string id, BindingKind binding, BindingKind lines.AddRange(host); return new NameCell { - Id = id, + Key = id, Family = Family.Local, Source = WithHelpers(Join(lines) + MainBlock(call.ToArray())), Tag = e.Tag, @@ -831,7 +831,7 @@ private static IEnumerable LocalCells() foreach (var u in LocalOuters) foreach (var body in u is BindingKind.StaticMethod or BindingKind.StaticField ? new[] { ReadPosition.MethodBody } : LocalBodies) { - string Id(string read) => CellId("local", k, read, $"outer={u}", body); + CellKey Id(string read) => CellId("local", k, read, $"outer={u}", body); // Read below the binding: the innermost binding, in both languages. yield return LocalProgram(Id("below"), k, u, body, LocalDecl(k, plain).Append($"print({own})").ToList(), Run(value, "N1-innermost"), null, plain) with { Timing = ReadTimings.SameBlockBelow }; @@ -864,7 +864,7 @@ private static IEnumerable LocalCells() { var own = ReadText(FormOf(k), "", n); var builtinCall = ReadText(Form.Call, "", n); - string Id(string read) => CellId("local", k, read, "outer=Builtin", body, name); + CellKey Id(string read) => CellId("local", k, read, "outer=Builtin", body, name); yield return LocalProgram(Id("below"), k, BindingKind.Builtin, body, LocalDecl(k, n).Append($"print({own})").ToList(), Run(BuiltinBindingValue, "N1-innermost"), null, n); var above = new List { $"print({builtinCall})" }; above.AddRange(LocalDecl(k, n)); @@ -1123,7 +1123,7 @@ private static IEnumerable ImportedOuterCells() // The control: the import read with nothing else of the name, the probe every other arm is measured against. yield return WithImport(new NameCell { - Id = CellId("read", BindingKind.ImportedName, ReadPosition.FunctionBody, "control", "outer=ImportedName"), + Key = CellId("read", BindingKind.ImportedName, ReadPosition.FunctionBody, "control", "outer=ImportedName"), Family = Family.Read, Source = MainBlock($"print({ImportedReadText})"), Tag = SharpyTag.MustRun, @@ -1142,7 +1142,7 @@ private static IEnumerable ImportedOuterCells() lines.AddRange(ModuleDecl(t, Imported)); yield return WithImport(new NameCell { - Id = CellId("read", t, ReadPosition.ModuleInitializer, Order.Later, "outer=ImportedName"), + Key = CellId("read", t, ReadPosition.ModuleInitializer, Order.Later, "outer=ImportedName"), Family = Family.Read, Source = Join(lines) + MainBlock("print(r)"), Tag = SharpyTag.MustRefuse, @@ -1181,7 +1181,7 @@ private static IEnumerable ImportedOuterCells() }; yield return WithImport(new NameCell { - Id = CellId("store", s, "outer=ImportedName", body), + Key = CellId("store", s, "outer=ImportedName", body), Family = Family.Store, Source = WithHelpers(Join(lines) + MainBlock(main.ToArray())), Tag = expected.Tag, @@ -1200,7 +1200,7 @@ private static IEnumerable ImportedOuterCells() foreach (var body in LocalBodies) { var own = ReadText(FormOf(k), "", Imported); - string Id(string read) => CellId("local", k, read, "outer=ImportedName", body); + CellKey Id(string read) => CellId("local", k, read, "outer=ImportedName", body); yield return WithImport(LocalProgram(Id("below"), k, BindingKind.ImportedName, body, LocalDecl(k, Imported).Append($"print({own})").ToList(), Run(BuiltinBindingValue, "N1-innermost"), null, Imported)); @@ -1256,7 +1256,7 @@ private static IEnumerable SeedCells() var source = File.ReadAllText(Path.Combine(dir, id + ".spy")); yield return new NameCell { - Id = CellId("seed", id), + Key = CellId("seed", id), Family = Family.Seed, Source = source, Tag = tag, @@ -1368,7 +1368,7 @@ private static IEnumerable ClosedSetFailures(IReadOnlyList poo foreach (var failure in RequiredDeviationFailures(pool).Take(20)) yield return failure; - foreach (var failure in RuleAxesFailures(pool)) + foreach (var failure in RuleTableFailures(pool).Concat(AdmittedRuleFailures(pool))) yield return failure; // N3's cycles are the one question where a throw also keeps the promise. Any other rule under this tag would read a throw as agreement. diff --git a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Generator.cs b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Generator.cs index 760b949d9..453823137 100644 --- a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Generator.cs +++ b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Generator.cs @@ -457,8 +457,11 @@ internal static (List Lines, string Access) PlaceAtModule(ReadPosition p } } - private static string CellId(params object?[] parts) - => string.Join("/", parts.Where(p => p != null).Select(p => Convert.ToString(p, CultureInfo.InvariantCulture)!.Replace(' ', '_'))); + private static CellKey CellId(params object?[] parts) + { + var kept = parts.Where(p => p != null).Select(p => p!).ToArray(); + return new CellKey(string.Join("/", kept.Select(p => Convert.ToString(p, CultureInfo.InvariantCulture)!.Replace(' ', '_'))), kept); + } internal static string MainPrinting(string access, string[]? setup) => MainBlock((setup ?? Array.Empty()).Append($"print({access})").ToArray()); diff --git a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Read.cs b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Read.cs index f3e3201bd..7fcafc288 100644 --- a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Read.cs +++ b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.Read.cs @@ -183,7 +183,7 @@ private static NameCell ClassCell( var expected = ExpectClass(t, p, nesting, order, s, outer, n, form); return new NameCell { - Id = CellId("read", t, p, nesting == Nesting.Direct ? null : nesting, order, s, $"outer={outer}", n.IsBuiltin ? n.Name : null), + Key = CellId("read", t, p, nesting == Nesting.Direct ? null : nesting, order, s, $"outer={outer}", n.IsBuiltin ? n.Name : null), Relation = DeclaringRelation.Self, Family = Family.Read, Source = source, @@ -221,7 +221,7 @@ private static NameCell ClassLocalOuterCell(BindingKind t, ReadPosition p, Order var value = ValueOf(outer); return new NameCell { - Id = CellId("read", t, p, order, Spelling.Bare, $"outer={outer}"), + Key = CellId("read", t, p, order, Spelling.Bare, $"outer={outer}"), Family = Family.Read, Source = source, Tag = SharpyTag.MustRun, @@ -359,7 +359,7 @@ private static NameCell QualifiedFromFunctionCell(BindingKind t, Order order, Sp var expected = IsInstance(t) ? Refuse(python, "kind:SPY0290") : Run(python, value, "N7"); return new NameCell { - Id = CellId("read", t, ReadPosition.FunctionBody, order, s, "outer=None"), + Key = CellId("read", t, ReadPosition.FunctionBody, order, s, "outer=None"), Family = Family.Read, Source = source, Tag = expected.Tag, @@ -406,6 +406,10 @@ p is ReadPosition.ModuleInitializer or ReadPosition.ModulePropertyInitializer or private static bool IsCompileTimeModule(BindingKind t) => t is BindingKind.ModuleLiteralConst; + /// A module binding whose read is a constant where a position takes constants only: a literal const, and an enum, + /// read as its member's .value (the owner's ruling of 2026-11-20, #2423 comment 7030074628 item 2: must-run). + private static bool IsConstantModuleRead(BindingKind t) => IsCompileTimeModule(t) || t == BindingKind.ModuleEnum; + private static NameCell ModuleCell(BindingKind t, ReadPosition p, Nesting nesting, Order order, Spelling s) { var n = ReadName.Plain; @@ -469,7 +473,7 @@ string Build(ReadPosition position) rule = "N1-nesting"; if (t == BindingKind.ModuleLet) expected = new Expected(SharpyTag.MayRefuse, Str(value), python, "kind:SPY0340"); - else if ((IsConstantOnly(p) || p == ReadPosition.EnumMemberValue) && !IsCompileTimeModule(t)) + else if ((IsConstantOnly(p) || p == ReadPosition.EnumMemberValue) && !IsConstantModuleRead(t)) expected = Refuse(python, p == ReadPosition.EnumMemberValue ? "kind:enum-member-constant" : "SPY0401"); else expected = Run(python, value, rule); @@ -477,7 +481,7 @@ string Build(ReadPosition position) return new NameCell { - Id = CellId("read", t, p, nesting == Nesting.Direct ? null : nesting, order, s, "outer=None"), + Key = CellId("read", t, p, nesting == Nesting.Direct ? null : nesting, order, s, "outer=None"), Family = Family.Read, Source = source, TwinSource = p == ReadPosition.ModuleAccessorBody ? Build(ReadPosition.FunctionBody).Replace("print(r)", "print(r())", StringComparison.Ordinal) : null, @@ -506,7 +510,7 @@ private static NameCell ModuleLocalOuterCell(BindingKind t, ReadPosition p, Bind var value = ValueOf(outer); return new NameCell { - Id = CellId("read", t, p, Order.Earlier, Spelling.Bare, $"outer={outer}"), + Key = CellId("read", t, p, Order.Earlier, Spelling.Bare, $"outer={outer}"), Family = Family.Read, Source = source, Tag = t == BindingKind.ModuleLet ? SharpyTag.MayRefuse : SharpyTag.MustRun, @@ -565,7 +569,7 @@ private static IEnumerable StrValueCells() { NameCell Cell(BindingKind t, ReadPosition p, string shape, Expected e, IEnumerable lines, string print) => new() { - Id = CellId("read", "str", t, p, shape), + Key = CellId("read", "str", t, p, shape), Family = Family.Read, Source = WithHelpers(Join(lines) + MainBlock(print)), Tag = e.Tag, @@ -644,7 +648,7 @@ private static IEnumerable UnionAndInterfaceReadCells() var all = o == Order.Earlier ? decl.Concat(lines) : lines.Concat(decl); yield return new NameCell { - Id = CellId("read", t, p, o, Spelling.Bare, "outer=None"), + Key = CellId("read", t, p, o, Spelling.Bare, "outer=None"), Family = Family.Read, Source = Join(all) + MainBlock($"print({access})"), Tag = SharpyTag.MustRun, @@ -695,7 +699,7 @@ private static IEnumerable ReadBuiltinModuleCells() var reader = $"def r() -> None:\n print({n.Name})\n"; yield return new NameCell { - Id = CellId("read", BindingKind.ModuleVar, ReadPosition.FunctionBody, o, "PrintedValue", "outer=Builtin", n.Name), + Key = CellId("read", BindingKind.ModuleVar, ReadPosition.FunctionBody, o, "PrintedValue", "outer=Builtin", n.Name), Family = Family.Read, Source = (o == Order.Earlier ? decl + reader : reader + decl) + MainBlock("r()"), Tag = SharpyTag.MustRun, @@ -759,7 +763,7 @@ private static NameCell BuiltinModuleCell(BindingKind t, ReadPosition p, Nesting return new NameCell { - Id = CellId("read", t, p, order, form, "outer=Builtin", n.Name), + Key = CellId("read", t, p, order, form, "outer=Builtin", n.Name), Family = Family.Read, Source = source, Tag = expected.Tag, @@ -788,7 +792,7 @@ private static NameCell BuiltinClassCell(ReadName n, Order order, bool arityMatc : arityMatches ? Run(9, "N1") : Refuse(python, "N1-arity"); return new NameCell { - Id = CellId("read", BindingKind.ModuleClass, ReadPosition.FunctionBody, order, arityMatches ? "arity-match" : "arity-mismatch", "outer=Builtin", n.Name), + Key = CellId("read", BindingKind.ModuleClass, ReadPosition.FunctionBody, order, arityMatches ? "arity-match" : "arity-mismatch", "outer=Builtin", n.Name), Family = Family.Read, Source = Join(lines) + MainBlock("print(r())"), Tag = expected.Tag, @@ -822,7 +826,7 @@ private static IEnumerable GenericReceiverCells() var main = MainBlock($"print({read})"); yield return new NameCell { - Id = CellId("read", kind, ReadPosition.FunctionBody, order, "GenericReceiver", "outer=None"), + Key = CellId("read", kind, ReadPosition.FunctionBody, order, "GenericReceiver", "outer=None"), Family = Family.Read, Source = order == Order.Earlier ? Join(type) + main : main + Join(type), Tag = SharpyTag.MustRun, @@ -881,7 +885,7 @@ private static IEnumerable ReadDeclaringCells() } yield return new NameCell { - Id = CellId("read", t, p, "base", Spelling.Bare, $"outer={u}"), + Key = CellId("read", t, p, "base", Spelling.Bare, $"outer={u}"), Relation = DeclaringRelation.Base, Family = Family.Read, Source = WithHelpers(Join(lines) + MainPrinting(placed.Access, placed.Setup)), @@ -906,12 +910,13 @@ private static IEnumerable ReadDeclaringCells() lines.AddRange(Indent(placed.Members)); bool load = IsInitializer(p); var python = prefix == "H." && load ? PyOutcome.Name("H") : PyOutcome.Ran(value); - var expected = IsConstantOnly(p) && (t != BindingKind.ClassLiteralConst || prefix != "B.") + // A literal const is a constant through its declaring class or a subclass of it (the same ruling, item 2). + var expected = IsConstantOnly(p) && (t != BindingKind.ClassLiteralConst || prefix == "self.") ? Refuse(python, "SPY0401") : Run(python, value, "N7"); yield return new NameCell { - Id = CellId("read", t, p, "base", label), + Key = CellId("read", t, p, "base", label), Relation = DeclaringRelation.Base, Family = Family.Read, Source = WithHelpers(Join(lines) + MainPrinting(placed.Access, placed.Setup)), @@ -939,7 +944,7 @@ private static IEnumerable ReadDeclaringCells() var python = o == Order.Later && IsInitializer(p) ? PyOutcome.Name("B") : PyOutcome.Ran(value); yield return new NameCell { - Id = CellId("read", t, p, "other", o, "B.x"), + Key = CellId("read", t, p, "other", o, "B.x"), Relation = DeclaringRelation.Other, Family = Family.Read, Source = WithHelpers(Join(lines) + MainPrinting(placed.Access, placed.Setup)), @@ -982,7 +987,7 @@ private static IEnumerable ReadDeclaringCells() expected = Refuse(PyOutcome.Other("TypeError"), "N1-type-error"); yield return new NameCell { - Id = CellId("read", t, label, "enclosing", Spelling.Bare, $"outer={u}"), + Key = CellId("read", t, label, "enclosing", Spelling.Bare, $"outer={u}"), Relation = DeclaringRelation.Enclosing, Family = Family.Read, Source = WithHelpers(Join(lines) + MainBlock($"print({access})")), @@ -1003,7 +1008,7 @@ private static IEnumerable ReadDeclaringCells() lines.AddRange(Indent(inner.Select(l => l.Replace("{E}", ReadText(form, "H.", n), StringComparison.Ordinal)))); yield return new NameCell { - Id = CellId("read", t, label, "enclosing", Spelling.Qualified), + Key = CellId("read", t, label, "enclosing", Spelling.Qualified), Relation = DeclaringRelation.Enclosing, Family = Family.Read, Source = WithHelpers(Join(lines) + MainBlock($"print({access})")), @@ -1064,7 +1069,7 @@ private static IEnumerable TypePositionCells() var twinMain = at == TypePosition.ResultError ? new[] { "print(r())" } : main; yield return new NameCell { - Id = CellId("read", "type-position", label, o), + Key = CellId("read", "type-position", label, o), Family = Family.Read, Source = (o == Order.Earlier ? target + reader : reader + target) + MainBlock(main), TwinSource = twin == null ? null : (o == Order.Earlier ? target + twin : twin + target) + MainBlock(twinMain), @@ -1086,7 +1091,7 @@ private static IEnumerable TypePositionCells() const string Reader = "def r() -> str:\n try:\n raise Later()\n except Later as e:\n return \"caught\"\n"; yield return new NameCell { - Id = CellId("read", "type-position", "except-clause", o), + Key = CellId("read", "type-position", "except-clause", o), Family = Family.Read, Source = (o == Order.Earlier ? Raising + Reader : Reader + Raising) + MainBlock("print(r())"), Tag = SharpyTag.MustRun, @@ -1102,7 +1107,7 @@ private static IEnumerable TypePositionCells() const string TryReader = "def boom() -> int:\n raise Later()\ndef r() -> str:\n x = try[Later] boom()\n match x:\n case Ok(v):\n return str(v)\n case Err(e):\n return \"caught\"\n"; yield return new NameCell { - Id = CellId("read", "type-position", "try-exception-type", o), + Key = CellId("read", "type-position", "try-exception-type", o), Family = Family.Read, Source = (o == Order.Earlier ? Raising + TryReader : TryReader + Raising) + MainBlock("print(r())"), TwinSource = "def r() -> str:\n return \"caught\"\n" + MainBlock("print(r())"), diff --git a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.RuleTable.cs b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.RuleTable.cs new file mode 100644 index 000000000..93396b649 --- /dev/null +++ b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.RuleTable.cs @@ -0,0 +1,362 @@ +using System.Text.Json; +using Sharpy.Compiler.Semantic.Validation; +using Sharpy.TestInfrastructure.Oracles; +using Xunit; + +namespace Sharpy.Compiler.Tests.Conformance; + +/// A cell's id with the values the generator built it from, each still carrying its type. The rule table's key +/// axes read these (): an order or a spelling is the enum +/// value the generator passed, never a token found in the id's text. +internal sealed record CellKey(string Text, IReadOnlyList Parts) +{ + /// The first part of this type, or null when the key spells none. + public T? Part() where T : struct, Enum + { + foreach (var part in Parts) + { + if (part is T value) + return value; + } + return null; + } + + /// The sub-generator's own label: the part after the family where it is text, not an axis value. + public string? Route => Parts.Count > 1 && Parts[1] is string s ? s : null; + + /// The text parts after the route: the generator's labels with no enumeration behind them. An + /// outer= part repeats and is not one. + public IEnumerable Marks => Parts.Skip(2).OfType().Where(s => !s.StartsWith("outer=", StringComparison.Ordinal)); + + public override string ToString() => Text; +} + +/// +/// The binding and scoping rule table (#2487; contract §11's case → expected map): name-resolution-rules.txt, +/// data beside the allowlist. A row is a tag, a rule id and a conjunction of axis constraints. Every generated cell +/// of every pool that reads the table matches exactly one row, and that row's tag and rule are the cell's: a verdict +/// is a function of the axes, so an arm retagged to a rule whose codes also fit is red here, which a per-rule +/// predicate could not see (#2457 cell 1: 2733 of the pool's cells fit a second rule's predicate). Every row has a cell. +/// +public partial class NameResolutionDifferentialTests +{ + private const string RuleTableFileName = "name-resolution-rules.txt"; + + /// Edit-loop only: a path that receives every cell's axis values, one JSON line each after a header line of + /// the axes' universes and classes. It is what a row is written against; no test reads it. + internal const string RuleTableDumpEnv = "NAME_RES_RULE_TABLE_DUMP"; + + /// The value of an axis a cell does not carry. + internal const string Unset = "-"; + + /// An axis of the table. is the enumeration's names, or null for an axis closed by + /// the pools: a value the table names there must be carried by a cell. : a cell carries any + /// number of values, and a constraint asks whether it carries one of the listed. + internal sealed record RuleAxis( + string Name, + Func> Read, + IReadOnlyCollection? Universe, + IReadOnlyDictionary> Classes, + bool SetValued = false); + + internal sealed record RuleConstraint(RuleAxis Axis, bool Negated, IReadOnlySet Values, string Text) + { + public bool Holds(NameCell cell) + { + bool any = false; + foreach (var value in Axis.Read(cell)) + { + if (Values.Contains(value)) + { + any = true; + break; + } + } + return any != Negated; + } + } + + /// A row. null is *: the cell's own tag, which only the seed row may say (a seed's tag + /// is its line in the seed table). + internal sealed record RuleRow(int Line, SharpyTag? Tag, string Rule, IReadOnlyList Constraints, string Text) + { + public bool Matches(NameCell cell) + { + foreach (var constraint in Constraints) + { + if (!constraint.Holds(cell)) + return false; + } + return true; + } + } + + private static IReadOnlySet NamesWhere(Func holds) where T : struct, Enum + => Enum.GetValues().Where(holds).Select(v => v.ToString()).ToHashSet(StringComparer.Ordinal); + + private static IEnumerable One(object? value) => new[] { value?.ToString() ?? Unset }; + + private static RuleAxis EnumAxis(string name, Func read, IReadOnlyDictionary>? classes = null) where T : struct, Enum + => new(name, c => One(read(c)), Enum.GetNames(), classes ?? new Dictionary>()); + + private static RuleAxis KeyAxis(string name) where T : struct, Enum + => EnumAxis(name, c => c.Key?.Part()); + + /// The classes of a binding kind, each the image of the roster or predicate the generator itself branches on. + private static IReadOnlyDictionary> BindingKindClasses() => new Dictionary>(StringComparer.Ordinal) + { + ["Module"] = NamesWhere(NameResolutionRosters.ModuleLevelKinds.Contains), + ["TypeLevel"] = NamesWhere(NameResolutionRosters.TypeLevelKinds.Contains), + ["Instance"] = NamesWhere(NameResolutionRosters.InstanceKinds.Contains), + ["PositionLocal"] = NamesWhere(NameResolutionRosters.PositionLocalKinds.Contains), + ["Named"] = NamesWhere(IsNamedOuter), + ["LocalOuter"] = NamesWhere(IsLocalOuter), + ["NonWritableByMeaning"] = NamesWhere(IsNonWritableByMeaning), + ["TypeLevelMember"] = NamesWhere(IsTypeLevelMember), + ["CallForm"] = NamesWhere(k => FormOf(k) == Form.Call), + ["CtorForm"] = NamesWhere(k => FormOf(k) == Form.Ctor), + ["ValueForm"] = NamesWhere(k => FormOf(k) == Form.Value), + }; + + private static IReadOnlyDictionary> ReadPositionClasses() => new Dictionary>(StringComparer.Ordinal) + { + ["Initializer"] = NamesWhere(IsInitializer), + ["ConstantOnly"] = NamesWhere(IsConstantOnly), + ["StructClosureBody"] = NamesWhere(NameResolutionRosters.StructClosureBodies.Contains), + }; + + /// The table's axes. Each is a typed property of the cell or a typed part of its key, except the three the + /// generator spells as text with no enumeration behind them: route (a sub-generator's label), mark (the + /// other labels of a key) and shape / deviation (an unruled question's name, a docs/deviations.yaml + /// row id). Those are closed by the pools. + internal static IReadOnlyList RuleTableAxes => LazyRuleTableAxes.Value; + + /// Lazy: the classes read rosters other files of this class initialize. + private static readonly Lazy> LazyRuleTableAxes = new(() => new[] + { + EnumAxis("family", c => c.Family), + EnumAxis("target", c => c.Target, BindingKindClasses()), + EnumAxis("outer", c => c.Outer, BindingKindClasses()), + EnumAxis("position", c => c.Position, ReadPositionClasses()), + EnumAxis("relation", c => c.Relation), + EnumAxis("form", c => c.Form), + EnumAxis("construct", c => c.Construct), + EnumAxis("timing", c => c.Timing), + EnumAxis("declaration", c => c.Declaration), + EnumAxis("typeAt", c => c.TypeAt), + KeyAxis("order"), + KeyAxis("spelling"), + KeyAxis("nesting"), + KeyAxis
("readForm"), + KeyAxis("receiver"), + KeyAxis("resultForm"), + KeyAxis("storeSpelling"), + KeyAxis("initializer"), + KeyAxis("annotation"), + KeyAxis("constantKind"), + KeyAxis("admission"), + KeyAxis("aliasTarget"), + KeyAxis("aliasUse"), + KeyAxis("overloadCaller"), + new RuleAxis("route", c => One(c.Family == Family.Seed ? null : c.Key?.Route), null, new Dictionary>()), + new RuleAxis("mark", c => c.Family == Family.Seed ? Array.Empty() : c.Key?.Marks ?? Array.Empty(), null, new Dictionary>(), SetValued: true), + new RuleAxis("shape", c => One(c.Shape), null, new Dictionary>()), + new RuleAxis("deviation", c => One(c.Deviation), null, new Dictionary>()), + }); + + /// The table's rows: <Tag|*> <rule> axis=value,@Class axis!=value …. Constraints on one row conjoin; the + /// values of one constraint are alternatives; - is an axis the cell does not carry; # opens a comment line. + internal static List ParseRuleTable(IEnumerable lines, List problems) + { + var axes = RuleTableAxes.ToDictionary(a => a.Name, StringComparer.Ordinal); + var rows = new List(); + int number = 0; + foreach (var raw in lines) + { + number++; + var line = raw.Trim(); + if (line.Length == 0 || line.StartsWith('#')) + continue; + var fields = line.Split(' ', StringSplitOptions.RemoveEmptyEntries); + SharpyTag? tag = null; + if (fields.Length < 2 || (fields[0] != "*" && !Enum.TryParse(fields[0], out var parsed))) + { + problems.Add($"RuleTable L{number}: '{line}' must be ' axis=value …'"); + continue; + } + if (fields[0] != "*") + tag = Enum.Parse(fields[0]); + + var constraints = new List(); + bool bad = false; + foreach (var field in fields.Skip(2)) + { + bool negated = field.Contains("!=", StringComparison.Ordinal); + var split = field.Split(negated ? "!=" : "=", 2); + if (split.Length != 2 || !axes.TryGetValue(split[0], out var axis)) + { + problems.Add($"RuleTable L{number}: '{field}' names no axis"); + bad = true; + continue; + } + var values = new HashSet(StringComparer.Ordinal); + foreach (var item in split[1].Split(',', StringSplitOptions.RemoveEmptyEntries)) + { + if (item.StartsWith('@')) + { + if (axis.Classes.TryGetValue(item[1..], out var members)) + values.UnionWith(members); + else + { + problems.Add($"RuleTable L{number}: {axis.Name} has no class {item}"); + bad = true; + } + } + else if (item != Unset && axis.Universe != null && !axis.Universe.Contains(item)) + { + problems.Add($"RuleTable L{number}: {item} is no value of {axis.Name}"); + bad = true; + } + else + values.Add(item); + } + if (values.Count == 0) + { + problems.Add($"RuleTable L{number}: '{field}' lists no value"); + bad = true; + } + constraints.Add(new RuleConstraint(axis, negated, values, field)); + } + if (!bad) + rows.Add(new RuleRow(number, tag, fields[1], constraints, line)); + } + return rows; + } + + private static readonly Lazy<(List Rows, List Problems)> LoadedRuleTable = new(() => + { + var problems = new List(); + var path = PythonInterpreter.FindRepoFile("src", "Sharpy.Compiler.Tests", "Conformance", RuleTableFileName); + if (path == null) + return (new List(), new List { $"RuleTable: Conformance/{RuleTableFileName} is missing. It is the table every pool is judged by." }); + return (ParseRuleTable(File.ReadAllLines(path), problems), problems); + }); + + internal static IReadOnlyList RuleTable() => LoadedRuleTable.Value.Rows; + + /// The pools that read the table. A row's cell may be in any of them; a cell's row is checked in its own sweep. + internal static readonly IReadOnlyList<(string Name, Func> Cells)> RuleTablePools = new (string, Func>)[] + { + (nameof(NameResolutionDifferentialTests), GeneratedCells), + (nameof(ScopeMeaningDifferentialTests), ScopeMeaningDifferentialTests.DraftCells), + }; + + /// The rows that claim a cell. One is the verdict; none or several is a totality failure. + internal static List RowsOf(IReadOnlyList rows, NameCell cell) + { + var matched = new List(1); + foreach (var row in rows) + { + if (row.Matches(cell)) + matched.Add(row); + } + return matched; + } + + /// The table's totality over one pool: every cell has a key, matches exactly one row, and carries that + /// row's tag and rule. Capped per kind, with the count. + internal static IEnumerable RuleTableCellFailures(IReadOnlyList rows, IReadOnlyList pool) + { + var none = new List(); + var several = new List(); + var differs = new List(); + foreach (var cell in pool) + { + if (cell.Key == null) + { + yield return $"RuleTable: {cell.Id} carries no key, so no key axis reads it"; + continue; + } + var matched = RowsOf(rows, cell); + if (matched.Count == 0) + none.Add($"RuleTable: {cell.Id} ({cell.Tag}, {cell.Rule}) matches no row"); + else if (matched.Count > 1) + several.Add($"RuleTable: {cell.Id} ({cell.Tag}, {cell.Rule}) matches rows L{string.Join(", L", matched.Select(r => r.Line))}"); + else if (matched[0].Rule != cell.Rule || (matched[0].Tag ?? cell.Tag) != cell.Tag) + differs.Add($"RuleTable: {cell.Id} is generated {cell.Tag} under {cell.Rule}, and its row L{matched[0].Line} says {matched[0].Tag?.ToString() ?? "*"} under {matched[0].Rule}"); + } + foreach (var group in new[] { none, several, differs }) + { + foreach (var failure in group.Take(25)) + yield return failure; + if (group.Count > 25) + yield return $"RuleTable: … {group.Count} such cells in total"; + } + } + + /// The table's totality over its rows, counted over every pool that reads it: a row has a cell, only the seed + /// row leaves the tag to the cell, and a value named on an axis the pools close is carried by a cell. + internal static IEnumerable RuleTableRowFailures(IReadOnlyList rows, IReadOnlyList cells) + { + foreach (var problem in LoadedRuleTable.Value.Problems) + yield return problem; + foreach (var row in rows) + { + if (row.Tag == null && row.Rule != "seed") + yield return $"RuleTable L{row.Line}: only the seed row may leave the tag to its cell"; + if (!cells.Any(row.Matches)) + yield return $"RuleTable L{row.Line}: no cell of any pool matches '{row.Text}'"; + } + foreach (var axis in RuleTableAxes.Where(a => a.Universe == null)) + { + var carried = cells.SelectMany(axis.Read).ToHashSet(StringComparer.Ordinal); + foreach (var row in rows) + { + foreach (var constraint in row.Constraints.Where(c => c.Axis == axis)) + { + foreach (var value in constraint.Values.Where(v => v != Unset && !carried.Contains(v))) + yield return $"RuleTable L{row.Line}: no cell carries {axis.Name} {value}"; + } + } + } + } + + /// Both directions for this pool, as the sweep and the fact read them. + internal static IEnumerable RuleTableFailures(IReadOnlyList pool) + { + var rows = RuleTable(); + return RuleTableRowFailures(rows, RuleTablePools.SelectMany(p => p.Cells()).ToList()).Concat(RuleTableCellFailures(rows, pool)); + } + + private static void DumpRuleTableAxes(string path) + { + using var writer = new StreamWriter(path); + writer.WriteLine(JsonSerializer.Serialize(new + { + axes = RuleTableAxes.Select(a => new + { + name = a.Name, + universe = a.Universe, + setValued = a.SetValued, + classes = a.Classes.ToDictionary(c => c.Key, c => c.Value.OrderBy(v => v, StringComparer.Ordinal).ToList()), + }), + })); + foreach (var (pool, cells) in RuleTablePools) + { + foreach (var c in cells()) + { + writer.WriteLine(JsonSerializer.Serialize(new + { + pool, + id = c.Id, + tag = c.Tag.ToString(), + rule = c.Rule, + model = c.Model, + python = c.Python.ToString(), + source = c.Source, + axes = RuleTableAxes.ToDictionary(a => a.Name, a => a.Read(c).ToList()), + })); + } + } + } +} diff --git a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.cs b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.cs index 5eb7e478c..e5bc55370 100644 --- a/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.cs +++ b/src/Sharpy.Compiler.Tests/Conformance/NameResolutionDifferentialTests.cs @@ -80,7 +80,18 @@ internal enum VerdictClass /// One generated cell: one Sharpy program, its twin (rendered from the source) and both predictions. internal sealed record NameCell { - public required string Id { get; init; } + private readonly string? _id; + + /// The cell's id. A generated cell's is its 's text; a fact's literal cell sets it alone. + public string Id + { + get => _id ?? Key?.Text ?? throw new InvalidOperationException("a cell carries an id or a key"); + init => _id = value; + } + + /// The values the generator built the id from, each with its type: what the rule table's key axes read + /// (NameResolutionDifferentialTests.RuleTableAxes), so no axis is read back from the id's text. + public CellKey? Key { get; init; } public required Family Family { get; init; } public required string Source { get; init; } public required SharpyTag Tag { get; init; } @@ -593,6 +604,10 @@ private static string ImplementingIssue(NameCell cell, VerdictClass verdict, Sha // A nested-scope `def` over a same-function `def` of the name is SPY0204: #1974's question, whose B-rules admit nested shadowing. if (cell.Rule == "#1974") return "#1974"; + // `self.N()` / `A.N()` on a nested type is refused as no such member (SPY0203). R-LQ admits it, in P16: the cell is + // #2397's (the owner's ruling of 2026-11-20, #2423 comment 7030074628). + if (cell.Target == BindingKind.NestedType && cell.Rule == "N7") + return "#2397"; // A read refused at a module initializer is refused because a later module VARIABLE is not visible yet (SPY0200): N1's // order-free resolution is the cure, and values-ready (#2422) cannot make a name visible (owner, 2026-11-16, #2422 // comment 6920337855). diff --git a/src/Sharpy.Compiler.Tests/Conformance/ScopeMeaningDifferentialTests.Axes.cs b/src/Sharpy.Compiler.Tests/Conformance/ScopeMeaningDifferentialTests.Axes.cs new file mode 100644 index 000000000..39e7f1799 --- /dev/null +++ b/src/Sharpy.Compiler.Tests/Conformance/ScopeMeaningDifferentialTests.Axes.cs @@ -0,0 +1,1970 @@ +using System.Reflection; +using System.Text.RegularExpressions; +using Sharpy.Compiler.Discovery; +using Sharpy.Compiler.Discovery.Caching; +using Sharpy.Compiler.Semantic; +using Sharpy.Compiler.Semantic.Registry; +using Sharpy.Compiler.Semantic.Validation; +using Sharpy.Compiler.Shared; +using Xunit; +using AstFunctionType = Sharpy.Compiler.Parser.Ast.FunctionType; +using AstTypeAlias = Sharpy.Compiler.Parser.Ast.TypeAlias; +using AstTypeAnnotation = Sharpy.Compiler.Parser.Ast.TypeAnnotation; +using Harness = Sharpy.Compiler.Tests.Conformance.NameResolutionDifferentialTests; +using ScopeKind = Sharpy.Compiler.Semantic.SymbolTable.ScopeKind; +using TypeKind = Sharpy.Compiler.Semantic.TypeKind; + +namespace Sharpy.Compiler.Tests.Conformance; + +/// +/// The axes of , each beside the enumeration it is the image of, with no +/// default arm: a value the enumeration gains has no entry, and is red +/// until it is generated or excluded with its reason. +/// +/// +/// no-initializer × hostTypeKind (Enum.GetValues) +/// no-initializer × declared typethe concrete subclasses of SemanticType (reflection) +/// typed-read × spelling, × reader positionSpelling and , as the +/// P77a pool runs a read of the kind (): the pool's own rosters decide where a read is legal +/// callee × outer (Enum.GetValues) +/// constant-kind × hostthe call sites of ConstantDefaultClassifier.IsAdmitted in the compiler's +/// source (a census: ScopeMeaningDifferentialTests.Readers.cs), each with the AdmissionTable it passes; the one +/// site that judges a const at every scope is refined by ScopeKind × TypeKind +/// constant-kind × member kindwhat the compiler records for a member, per where the member +/// lives: a referenced module's value (a census of discovery's FieldSignature.IsConst × IsGuarded over the +/// Stdlib), a referenced type's member (the subclasses of ClrMemberResolution, a field refined by what C# reads as a +/// constant: FieldInfo.IsLiteral, or a DecimalConstantAttribute), the program's own enum +/// (EnumMemberAccessKind), and any other name of the program () +/// lambda-default × owner, × positionLambdaExpression.IsArrowSyntax with the def +/// control, and the positions at which the P77a pool runs a bare read of the member from its own type +/// () +/// alias-target × siteScopeKind × TypeKind: the scope an alias's binder declares into +/// alias-target × shapethe public properties of the alias's three AST records +/// (TypeAlias, TypeAnnotation, FunctionType): each place a target can hold a type's name +/// +/// +public sealed partial class ScopeMeaningDifferentialTests +{ + // ------------------------------------------------------------------------------------------- // + // Exclusions that rest on what the compiler does today + // ------------------------------------------------------------------------------------------- // + + /// A program and what the compiler does with it today. An exclusion whose reason is one of these keys is true + /// only while the probe holds: when the behaviour changes the probe is red, and the value is generated or re-reasoned. + /// A reason that says more than one thing of the compiler names the others in , each held the same way. + internal sealed record BehaviourProbe(string Source, string Expected, Func Holds, bool Stdlib = false, BehaviourProbe[]? Also = null) + { + /// This probe and every other program its reason rests on. + public IEnumerable All => (Also ?? Array.Empty()).Prepend(this); + } + + private static bool Refused(Harness.SharpyRun run, string code, string? cs = null) + => run.ErrorCodes.Contains(code) && (cs == null || run.CsCode == cs); + + /// The program compiled, ran and printed . + private static bool Printed(Harness.SharpyRun run, string stdout) + => run is { Success: true, ExitCode: 0, TimedOut: false } && run.ErrorCodes.Count == 0 && Harness.Normalize(run.Stdout) == stdout; + + private static BehaviourProbe Prints(string source, string stdout, BehaviourProbe[]? Also = null) => new(source, $"a run that prints '{stdout}'", r => Printed(r, stdout), Also: Also); + + /// What the review of PR #2767's test code found excluded under a false reason, and the owner then ruled on (#2423 + /// comment 7052893050, item 26): the reason is corrected and probed, and no cell is generated. + private const string ByItem26 = "not generated, by the owner's decision (#2423 comment 7052893050, item 26: the fix round after the independent review adds no cell)"; + + private const string TailMain = "def main() -> None:\n print(1)\n"; + + private const string ModuleLetRefused = "a module `let` is refused at every order (SPY0340, P21b)"; + private const string InAnInterfaceEachKindIsOut = "in an interface each declaration kind is out for its own reason. A `@static` value member is SPY0908 CS0120 with its initializer and without (#2383's class), so it has no running control there. An instance field declares no member a read finds: `h.x` through the interface is SPY0203 with its initializer and without (#2383's class too). An instance `property x: T` is a signature an implementing class fills, and it runs (`class C(H): property x: int = 5` prints `5`): that control, of a kind R-QI leaves alone, is " + ByItem26 + ", and no tracker holds it, since it is green"; + private const string EnumBodyHoldsCases = "an enum body holds `NAME = value` cases and nothing else (SPY0101 / SPY0103)"; + private const string UnionBodyHoldsCases = "a union body holds cases and methods and nothing else (SPY0104)"; + + internal static readonly IReadOnlyDictionary BehaviourProbes = new Dictionary(StringComparer.Ordinal) + { + [ModuleLetRefused] = new("let x = 5\n" + TailMain, "SPY0340", r => Refused(r, "SPY0340")), + [InAnInterfaceEachKindIsOut] = new("interface H:\n @static\n x: int = 5\ndef main() -> None:\n print(H.x)\n", "SPY0908 CS0120", r => Refused(r, "SPY0908", "CS0120"), Also: new BehaviourProbe[] + { + new("interface H:\n @static\n x: int\n def m(self) -> int: ...\ndef main() -> None:\n print(H.x)\n", "SPY0908 CS0120", r => Refused(r, "SPY0908", "CS0120")), + new("interface H:\n @static\n property x: int = 5\n def m(self) -> int: ...\ndef main() -> None:\n print(H.x)\n", "SPY0908 CS0120", r => Refused(r, "SPY0908", "CS0120")), + new("interface H:\n @static\n property x: int\n def m(self) -> int: ...\ndef main() -> None:\n print(H.x)\n", "SPY0908 CS0120", r => Refused(r, "SPY0908", "CS0120")), + new(InterfaceMember("x: int = 5", "x: int = 5"), "SPY0203", r => Refused(r, "SPY0203")), + new(InterfaceMember("x: int", "x: int = 5"), "SPY0203", r => Refused(r, "SPY0203")), + Prints(InterfaceMember("property x: int", "property x: int = 5"), "5"), + }), + [ACalleeBinderIsOut(LocalTarget.MatchCapture)] = CalleeBinderProbe("f: () -> int = one\n match f:\n case x:\n print(x())"), + [ACalleeBinderIsOut(LocalTarget.AsPatternCapture)] = CalleeBinderProbe("f: () -> int = one\n match f:\n case _ as x:\n print(x())"), + [ACalleeBinderIsOut(LocalTarget.OutLet)] = CalleeBinderProbe("give(out let x)\n print(x())", "type F = () -> int\ndef give(f: out F) -> None:\n f = one\n"), + [AnExceptionIsCalled] = Prints("x: int = 12\n" + CallableException, "1", Also: new[] { Prints(CallableException, "1") }), + [AThirdPlacement(DeclaringRelation.Base)] = ThirdPlacementProbe("class B:\n @static\n x: int = 5\n", "class H(B):\n @static\n r: int = nb(B.x)\n"), + [AThirdPlacement(DeclaringRelation.Other)] = ThirdPlacementProbe("class B:\n @static\n x: int = 5\n", "class H:\n @static\n r: int = nb(B.x)\n"), + [AGenericReceiver] = ThirdPlacementProbe("class G[T]:\n @static\n x: int = 5\n", "def r() -> int:\n return nb(G[int].x)\n"), + [AThirdPlacement(DeclaringRelation.Enclosing)] = new(NestedReader(memberAbove: false, "x: int = 5"), "SPY0220", r => Refused(r, "SPY0220"), Also: new BehaviourProbe[] + { + new(NestedReader(memberAbove: true, "x: int = 5"), "SPY0220", r => Refused(r, "SPY0220")), + new(NestedReader(memberAbove: false, "x: auto = 5"), "SPY0908 CS1503", r => Refused(r, "SPY0908", "CS1503")), + new(NestedReader(memberAbove: true, "x: auto = 5"), "SPY0908 CS1503", r => Refused(r, "SPY0908", "CS1503")), + }), + [EnumBodyHoldsCases] = new("enum H:\n type K0 = int\n RED = 1\n" + TailMain, "SPY0103", r => Refused(r, "SPY0103") || Refused(r, "SPY0101")), + [UnionBodyHoldsCases] = new("union H:\n type K0 = int\n case A()\n" + TailMain, "SPY0104", r => Refused(r, "SPY0104")), + [NeedsItsValue] = new("const x: int\ndef main() -> None:\n let y: int\n print(1)\n", "SPY0104", r => r.ErrorCodes.Count(c => c == "SPY0104") == 2), + [DelegateHasNoBody] = new("delegate D(x: int) -> int:\n type K0 = int\n" + TailMain, "SPY0100", r => Refused(r, "SPY0100")), + [EnumBodyHoldsNoConst] = new("enum H:\n const K: int = 1\n RED = 1\n" + TailMain, "SPY0101", r => Refused(r, "SPY0101")), + [UnionBodyHoldsNoConst] = new("union H:\n const K: int = 1\n case A()\n" + TailMain, "SPY0104", r => Refused(r, "SPY0104")), + [LambdaTakesNoCallableSlot] = new("def five() -> int:\n return 5\ndef main() -> None:\n f = lambda p: () -> int = five: p\n print(1)\n", "SPY0103", r => Refused(r, "SPY0103"), Also: new BehaviourProbe[] + { + new("def five() -> int:\n return 5\ndef main() -> None:\n f = (p: () -> int = five) -> p\n print(1)\n", "SPY0401", r => Refused(r, "SPY0401")), + new("import math\ndef main() -> None:\n f = (p: (float) -> float = math.sqrt) -> p\n print(1)\n", "SPY0908 CS1736", r => Refused(r, "SPY0908", "CS1736"), Stdlib: true), + }), + [AnIntEnum] = new("enum H:\n RED = 1.5\n" + TailMain, "SPY0253", r => Refused(r, "SPY0253")), + [AnEscapedNameIsMissingAsItsPlainOne] = new("type K0 = `nosuch`\ndef f(k: K0) -> int:\n return 1\n" + TailMain, "SPY0202", r => Refused(r, "SPY0202"), + Also: new BehaviourProbe[] { new("type K0 = nosuch\ndef f(k: K0) -> int:\n return 1\n" + TailMain, "SPY0202", r => Refused(r, "SPY0202")) }), + [NamesAType] = new("class G:\n class x:\n v: int = 5\ndef f(p: int = G.x) -> int:\n return p\n" + TailMain, "SPY0220", r => Refused(r, "SPY0220")), + [NoSuchMember] = new("def f(p: int = int.nosuch) -> int:\n return p\n" + TailMain, "SPY0203", r => Refused(r, "SPY0203")), + [ACallByShape] = new("def five() -> int:\n return 5\ndef f(p: int = five()) -> int:\n return p\n" + TailMain, "SPY0401", r => Refused(r, "SPY0401")), + [ALocalInAConstantPosition] = new("def main() -> None:\n y: int = 5\n f = lambda p: int = y: p\n print(f())\n", "SPY0401", r => Refused(r, "SPY0401")), + [NamesAModuleType] = new("import pathlib\ndef f(p: int = pathlib.Path) -> int:\n return p\n" + TailMain, "SPY0220", r => Refused(r, "SPY0220"), Stdlib: true), + [AnInstanceMemberThroughItsType] = new("from system import DateTime\ndef main() -> None:\n x: object = DateTime.year\n print(1)\n", "SPY0908 CS0120", r => Refused(r, "SPY0908", "CS0120")), + [ASiblingCaseIsNoName] = new("enum H:\n RED = 5\n BLUE = RED\ndef main() -> None:\n print(H.BLUE.value)\n", "SPY0200", r => Refused(r, "SPY0200")), + [NoSelfAtATypeBody] = new("class H:\n const x: int = 5\n const K: int = self.x\ndef main() -> None:\n print(H.K)\n", "SPY0200", r => Refused(r, "SPY0200")), + [AGenericMethodThroughItsType] = new("from system import Array\ndef main() -> None:\n x: object = Array.resize\n print(1)\n", "SPY0908 CS8917", r => Refused(r, "SPY0908", "CS8917")), + [LambdaTakesOneNameForAType] = new("import system\ndef main() -> None:\n f = lambda p: system.DayOfWeek: p\n print(1)\n", "SPY0103", r => Refused(r, "SPY0103"), Also: new[] + { + Prints("import system\ndef main() -> None:\n f = (p: system.DayOfWeek = system.DayOfWeek.Monday) -> p\n print(f())\n", "DayOfWeek.Monday"), + }), + [AliasedIntEnumRead(EnumMemberAccessKind.IntValue)] = new(IntEnum + "\ntype A = E0\ndef main() -> None:\n print(A.RED.value)\n", "SPY0908 CS1061", r => Refused(r, "SPY0908", "CS1061")), + [AliasedIntEnumRead(EnumMemberAccessKind.IntName)] = new(IntEnum + "\ntype A = E0\ndef main() -> None:\n print(A.RED.name)\n", "SPY0908 CS1061", r => Refused(r, "SPY0908", "CS1061")), + [InterfaceStaticIsRefused("field")] = new("interface H:\n @static\n x: int = 5\n def m(self) -> int: ...\ndef main() -> None:\n print(H.x)\n", "SPY0908 CS0120", r => Refused(r, "SPY0908", "CS0120")), + [InterfaceStaticIsRefused("property")] = new("interface H:\n @static\n property x: int = 5\n def m(self) -> int: ...\ndef main() -> None:\n print(H.x)\n", "SPY0908 CS0120", r => Refused(r, "SPY0908", "CS0120")), + [CharNamesNoReceiver] = new("def main() -> None:\n x: object = char.is_ascii_digit\n print(1)\n", "SPY0200", r => Refused(r, "SPY0200")), + [AStoredLambdaLosesItsDefault] = new("class H:\n @static\n g: auto = lambda p1: int = 5: p1\ndef main() -> None:\n print(H.g())\n", "SPY0908 CS7036", r => Refused(r, "SPY0908", "CS7036")), + [ALambdaDefaultInAPropertyDefault(false)] = new("class H:\n property r: int = (lambda p1: int = 5: p1)()\ndef main() -> None:\n print(H().r)\n", "SPY0908 CS0103", r => Refused(r, "SPY0908", "CS0103")), + [ALambdaDefaultInAPropertyDefault(true)] = new("class H:\n @static\n property r: int = (lambda p1: int = 5: p1)()\ndef main() -> None:\n print(H.r)\n", "SPY0908 CS0103", r => Refused(r, "SPY0908", "CS0103")), + [ACallInAConstantOnlyPosition] = new("class H:\n def r(self, p0: int = (lambda p1: int = 5: p1)()) -> int:\n return p0\n" + TailMain, "SPY0401", r => Refused(r, "SPY0401")), + [InterfaceStaticIsRefused("method, read uncalled", "#2111")] = new("interface H:\n @static\n def x() -> int:\n return 5\n def m(self) -> int: ...\ndef main() -> None:\n f: () -> int = H.x\n print(f())\n", "SPY0908 CS0120", r => Refused(r, "SPY0908", "CS0120")), + }; + + /// What the compiler does with a program when it runs in a process of its own: the behaviour is a crash, which a + /// probe in this process would not survive. is a program the same child compiles, so a child + /// that dies for a reason of its own (a missing assembly ends a process with the same exit code) is not read as the crash. + internal sealed record CrashProbe(string Source, string Control, string Expected, Func Holds); + + internal static readonly IReadOnlyDictionary CrashProbes = new Dictionary(StringComparer.Ordinal) + { + [OverflowsTheCompiler] = new("type K0 = list[K0]\ndef f(k: K0) -> int:\n return 1\n" + TailMain, "type K0 = list[K0]\n" + TailMain, + "a stack overflow that ends the process", c => c.Overflowed), + }; + + // ------------------------------------------------------------------------------------------- // + // no-initializer (R-QI): kind × initializer × host × declared type + // ------------------------------------------------------------------------------------------- // + + /// How a kind declares x with a type and no value ({T} the type, {L} a value of it), whether the + /// declaration sits in a type and how main reads it. : the statements that give it a value before + /// the read, for the kinds R-QI leaves alone. + internal sealed record Declared(string Text, bool InType, string Read, string? Accessor = null, string[]? Stored = null, bool Twin = false); + + private static readonly string[] StoredInInit = { "def __init__(self):", " self.x = {L}" }; + + internal static readonly IReadOnlyDictionary Declarations = new Dictionary + { + [BindingKind.ModuleVar] = new("x: {T}", false, "x", Twin: true), + [BindingKind.ModuleProperty] = new("property x: {T}", false, "x", Accessor: "property get x() -> {T}:\n return {L}"), + [BindingKind.StaticField] = new("@static\nx: {T}", true, "H.x", Twin: true), + [BindingKind.StaticProperty] = new("@static\nproperty x: {T}", true, "H.x", Accessor: "@static\nproperty get x() -> {T}:\n return {L}"), + [BindingKind.InstanceField] = new("x: {T}", true, "H().x", Stored: StoredInInit, Twin: true), + [BindingKind.InstanceProperty] = new("property x: {T}", true, "H().x", Accessor: "property get x(self) -> {T}:\n return {L}", Stored: StoredInInit), + [BindingKind.LocalVar] = new("x: {T}", false, "x", Stored: new[] { "x = {L}" }, Twin: true), + }; + + private const string NeedsItsValue = "the declaration's grammar takes a value: there is no spelling without one (SPY0104)"; + private const string NoValueSlot = "declares no storage with a type annotation, so it has no initializer to leave out"; + + internal static readonly IReadOnlyDictionary ExcludedDeclarations = new Dictionary + { + [BindingKind.ModuleLet] = ModuleLetRefused, + [BindingKind.ModuleLiteralConst] = NeedsItsValue, + [BindingKind.ModuleComputedConst] = NeedsItsValue, + [BindingKind.ClassLiteralConst] = NeedsItsValue, + [BindingKind.ClassComputedConst] = NeedsItsValue, + [BindingKind.LocalLet] = NeedsItsValue, + [BindingKind.LocalLiteralConst] = NeedsItsValue, + [BindingKind.LocalComputedConst] = NeedsItsValue, + [BindingKind.LambdaTypedLocal] = "a local `x: T` with another type: the LocalVar cell's `callable` type is its shape", + [BindingKind.ModuleDef] = NoValueSlot, + [BindingKind.ModuleClass] = NoValueSlot, + [BindingKind.ModuleStruct] = NoValueSlot, + [BindingKind.ModuleEnum] = NoValueSlot, + [BindingKind.ModuleUnion] = NoValueSlot, + [BindingKind.ModuleInterface] = NoValueSlot, + [BindingKind.ModuleTypeAlias] = NoValueSlot, + [BindingKind.StaticMethod] = NoValueSlot, + [BindingKind.NestedType] = NoValueSlot, + [BindingKind.InstanceMethod] = NoValueSlot, + [BindingKind.Constructor] = NoValueSlot, + [BindingKind.LocalDef] = NoValueSlot, + [BindingKind.EnclosingLocal] = "a local read from a nested function: the LocalVar cell's declaration", + [BindingKind.Parameter] = "a parameter's value is its argument", + [BindingKind.Inner] = "bound by its comprehension or lambda", + [BindingKind.Builtin] = "not declared by the program", + [BindingKind.ImportedName] = "not declared by the program", + [BindingKind.None] = "no binding", + }; + + /// A host of a member declaration as a TYPED part of a cell's key: its kind and the keyword that opens its body, + /// which is how the id spells it. Typed, because the keywords class and struct are also the labels of two + /// declared types (): as text, a cell of either carried both, and the coverage check below could not + /// tell a host from a type (the review of PR #2767, F7). + internal sealed record DeclarationHost(TypeKind Kind, string Keyword) + { + public override string ToString() => Keyword; + } + + /// The hosts of a member declaration, total over TypeKind with . + internal static readonly IReadOnlyDictionary DeclarationHosts = new Dictionary + { + [TypeKind.Class] = new[] { new DeclarationHost(TypeKind.Class, "class") }, + [TypeKind.Struct] = new[] { new DeclarationHost(TypeKind.Struct, "struct") }, + }; + + /// The host of a no-initializer cell, or null for a declaration outside every type. + internal static DeclarationHost? HostOf(NameCell cell) => cell.Key!.Parts.OfType().FirstOrDefault(); + + internal static readonly IReadOnlyDictionary ExcludedDeclarationHosts = new Dictionary + { + [TypeKind.Interface] = InAnInterfaceEachKindIsOut, + [TypeKind.Enum] = EnumBodyHoldsCases, + [TypeKind.Union] = UnionBodyHoldsCases, + [TypeKind.Delegate] = DelegateHasNoBody, + }; + + /// An interface that declares , a class that implements it with + /// , and a read of the member through the interface. + private static string InterfaceMember(string declared, string implemented) + => $"interface H:\n {declared}\n def m(self) -> int: ...\nclass C(H):\n {implemented}\n def m(self) -> int:\n return 1\ndef main() -> None:\n h: H = C()\n print(h.x)\n"; + + /// A declared type: its label in a cell's id, its spelling, a value of it, how main shows that value as + /// 5 ({0} the read), the declarations it needs, and whether the value is one a constant position admits + /// (a literal, an enum member, a collection literal at a field: AdmissionTable.PerInstanceFieldDefault). + internal sealed record ValueType(string Label, string Spelling, string Literal, string Show, string? Prelude = null, bool Twin = false, bool Constant = false); + + /// The declared types, total over the concrete subclasses of SemanticType with . + /// What a missing initializer leaves behind differs by type (0, None, a default struct), and R-QI refuses all of them. + internal static readonly IReadOnlyDictionary ValueTypes = new Dictionary + { + [typeof(BuiltinType)] = new[] { new ValueType("int", "int", "5", "{0}", Twin: true, Constant: true), new ValueType("str", "str", "\"5\"", "{0}", Constant: true) }, + [typeof(GenericType)] = new[] { new ValueType("list", "list[int]", "[5]", "{0}[0]", Constant: true) }, + [typeof(UserDefinedType)] = new[] + { + new ValueType("class", "C0", "C0()", "{0}.v", "class C0:\n v: int = 5"), + new ValueType("struct", "S0", "S0()", "{0}.v", "struct S0:\n v: int = 5"), + new ValueType("enum", "E0", "E0.RED", "{0}.value", "enum E0:\n RED = 5", Constant: true), + }, + [typeof(OptionalType)] = new[] { new ValueType("optional", "int?", "Some(5)", "{0}.unwrap()") }, + [typeof(NullableType)] = new[] { new ValueType("nullable", "str | None", "\"5\"", "{0}", Constant: true) }, + [typeof(ResultType)] = new[] { new ValueType("result", "int !str", "Ok(5)", "{0}.unwrap()") }, + [typeof(Sharpy.Compiler.Semantic.FunctionType)] = new[] { new ValueType("callable", "() -> int", "lambda: 5", "{0}()") }, + [typeof(TupleType)] = new[] { new ValueType("tuple", "tuple[int, int]", "(5, 6)", "{0}[0]") }, + [typeof(LiteralStringType)] = new[] { new ValueType("literal-string", "LiteralString", "\"5\"", "{0}", Constant: true) }, + }; + + private const string NoAnnotationSpellsIt = "the checker's type of an expression: no annotation spells it, so no declaration has it"; + + internal static readonly IReadOnlyDictionary ExcludedValueTypes = new Dictionary + { + [typeof(UnknownType)] = NoAnnotationSpellsIt, + [typeof(VoidType)] = "`None` as a return type: no storage has it", + [typeof(ModuleType)] = NoAnnotationSpellsIt, + [typeof(GenericFunctionType)] = NoAnnotationSpellsIt, + [typeof(ConstructorReferenceType)] = NoAnnotationSpellsIt, + [typeof(UnmappedClrType)] = NoAnnotationSpellsIt, + [typeof(TypeParameterType)] = "needs a generic host: the 8951 pool's excluded axis (ii), InterfaceUnionEnumGenericHosts", + [typeof(SelfType)] = "`Self` is a member signature's spelling of its own type: a slot of it is the UserDefinedType cell", + [typeof(UnionType)] = "a placeholder record (its own doc comment): a declared `union` is a UserDefinedType, and only the symbol deserializer builds this one", + [typeof(TaskType)] = "the type the checker gives an `async def`'s return: a slot of it needs an awaited value, and async is outside N1 to N7", + }; + + // ------------------------------------------------------------------------------------------- // + // typed-read: kind × annotation × order × spelling × reader position + // ------------------------------------------------------------------------------------------- // + + internal enum MemberLevel + { + Module, + Type, + Instance, + } + + /// An int-valued declaration of x per kind, with its inferred spelling where the kind has one, its level and + /// the text that reads it after its receiver (x, or x() for a callable). + internal sealed record Typed(string Annotated, string? Inferred, MemberLevel Level, string Member, bool NeedsFive = false); + + internal static readonly IReadOnlyDictionary TypedReads = new Dictionary + { + [BindingKind.ModuleVar] = new("x: int = 5", "x: auto = 5", MemberLevel.Module, "x"), + [BindingKind.ModuleLiteralConst] = new("const x: int = 5", "const x = 5", MemberLevel.Module, "x"), + [BindingKind.ModuleComputedConst] = new("const x: int = five()", "const x = five()", MemberLevel.Module, "x", NeedsFive: true), + [BindingKind.ModuleProperty] = new("property x: int = 5", null, MemberLevel.Module, "x"), + [BindingKind.ModuleDef] = new("def x() -> int:\n return 5", null, MemberLevel.Module, "x()"), + [BindingKind.StaticField] = new("@static\nx: int = 5", "@static\nx: auto = 5", MemberLevel.Type, "x"), + [BindingKind.StaticProperty] = new("@static\nproperty x: int = 5", null, MemberLevel.Type, "x"), + [BindingKind.StaticMethod] = new("@static\ndef x() -> int:\n return 5", null, MemberLevel.Type, "x()"), + [BindingKind.ClassLiteralConst] = new("const x: int = 5", "const x = 5", MemberLevel.Type, "x"), + [BindingKind.ClassComputedConst] = new("const x: int = five()", "const x = five()", MemberLevel.Type, "x", NeedsFive: true), + [BindingKind.InstanceField] = new("x: int = 5", "x: auto = 5", MemberLevel.Instance, "x"), + [BindingKind.InstanceProperty] = new("property x: int = 5", null, MemberLevel.Instance, "x"), + [BindingKind.InstanceMethod] = new("def x(self) -> int:\n return 5", null, MemberLevel.Instance, "x()"), + }; + + private const string NotAnIntValue = "its read is no int value at a module or type level: the mismatch against bool is not a question of order"; + private const string ALocal = "a local: a read above it is R-KX's (P80)"; + + internal static readonly IReadOnlyDictionary ExcludedTypedReads = new Dictionary + { + [BindingKind.ModuleLet] = ModuleLetRefused, + [BindingKind.ModuleClass] = NotAnIntValue, + [BindingKind.ModuleStruct] = NotAnIntValue, + [BindingKind.ModuleEnum] = NotAnIntValue, + [BindingKind.ModuleUnion] = NotAnIntValue, + [BindingKind.ModuleInterface] = NotAnIntValue, + [BindingKind.ModuleTypeAlias] = NotAnIntValue, + [BindingKind.NestedType] = NotAnIntValue, + [BindingKind.Constructor] = NotAnIntValue, + [BindingKind.EnclosingLocal] = ALocal, + [BindingKind.Parameter] = ALocal, + [BindingKind.Inner] = ALocal, + [BindingKind.LocalVar] = ALocal, + [BindingKind.LocalLet] = ALocal, + [BindingKind.LocalLiteralConst] = ALocal, + [BindingKind.LocalComputedConst] = ALocal, + [BindingKind.LocalDef] = ALocal, + [BindingKind.LambdaTypedLocal] = ALocal, + [BindingKind.Builtin] = "not declared by the program", + [BindingKind.ImportedName] = "not declared by the program", + [BindingKind.None] = "no binding", + }; + + /// The spellings with no typed-read cell. Call is the 8951 pool's get(): a helper whose DECLARED return + /// type is what the reader sees, so the read itself sits in the helper's body, which is the function-body cell. + internal static readonly IReadOnlyDictionary ExcludedTypedSpellings = new Dictionary + { + [Harness.Spelling.Call] = "the reader sees the helper's declared return type; the read sits in the helper's body, which is the FunctionBody cell", + }; + + internal static readonly IReadOnlyDictionary ExcludedTypedPositions = new Dictionary + { + [ReadPosition.EnumMemberValue] = "an enum member's value has no annotated slot and admits no call: nothing takes the probe (its reads are constant-kind's and the 8951 pool's)", + [ReadPosition.TypeAliasTarget] = "holds a type's name: no value is read there", + [ReadPosition.BaseList] = "holds a type's name: no value is read there", + }; + + /// + /// The reason a reader in a THIRD type has no typed-read cell (the review of PR #2767, F2: 137 must-run reads of the 8951 + /// pool stood in such a type and were dropped unseen, by a filter that asked for a spelling and an order before it asked + /// where the reader stood). The reads run in that pool; whether they are TYPED is what no cell here holds, and each + /// placement's probes are the programs that say what they are today. A switch and no table, as . + /// + private const string TheOrdersClass = ": D2's class, which the generated placements hold red (#2423, which holds the program as a cell)"; + + private static string AThirdPlacement(DeclaringRelation placement) + { + const string BelowIsUntyped = "Handed to a `bool` slot, an annotated member's read is SPY0220 where the member stands above, and SPY0908 CS1503 where "; + (string where, string today) = placement switch + { + DeclaringRelation.Base => ("in a subclass of the member's type (`class H(B)` reads `B.x`, `H.x` or `self.x`)", BelowIsUntyped + "the base stands below its subclass" + TheOrdersClass), + DeclaringRelation.Other => ("in a type unrelated to the member's (`class H` reads `B.x`)", BelowIsUntyped + "the member's type stands below the reader's" + TheOrdersClass), + DeclaringRelation.Enclosing => ("in a type nested in the member's (`class I` in `H` reads `H.x`)", + "Handed to a `bool` slot, an annotated member's read is SPY0220 above and below the nested type, and an inferred one's (`x: auto = 5`) is SPY0908 CS1503 at both, as it is from every generated placement (#2417's class, which the generated rows hold)"), + _ => throw new ArgumentOutOfRangeException(nameof(placement), placement, "the member's own type, or a placement the 8951 pool does not spell"), + }; + return $"the reader stands {where}: the 8951 pool runs the read from there, and this set places the reader of a type's member in that type or outside every type. {today}. The placement is {ByItem26}"; + } + + /// The probe of a read this set has no reader for: the reader above the member's type (untyped today) and below it (typed). + private static BehaviourProbe ThirdPlacementProbe(string member, string reader) + => new($"{Probe}\n{reader}{member}{TailMain}", "SPY0908 CS1503", r => Refused(r, "SPY0908", "CS1503"), + Also: new BehaviourProbe[] { new($"{Probe}\n{member}{reader}{TailMain}", "SPY0220", r => Refused(r, "SPY0220")) }); + + private static string NestedReader(bool memberAbove, string member) + { + string declared = $" @static\n {member}\n"; + const string Nested = " class I:\n @static\n r: int = nb(H.x)\n"; + return $"{Probe}\nclass H:\n{(memberAbove ? declared + Nested : Nested + declared)}{TailMain}"; + } + + /// The placements of a reader against the member's type with no typed-read cell: each one the 8951 pool spells a + /// must-run read from (), and no other. + internal static readonly IReadOnlyDictionary ExcludedTypedPlacements = new Dictionary + { + [DeclaringRelation.Base] = AThirdPlacement(DeclaringRelation.Base), + [DeclaringRelation.Other] = AThirdPlacement(DeclaringRelation.Other), + [DeclaringRelation.Enclosing] = AThirdPlacement(DeclaringRelation.Enclosing), + }; + + private const string AGenericReceiver = "the member is read through its generic type's constructed name (`G[int].x`), which the 8951 pool spells by a label of its own and no `Spelling`; a typed-read kind is declared in a type with no type parameter. Handed to a `bool` slot, an annotated member's read is SPY0220 where the type stands above its reader, and SPY0908 CS1503 where it stands below" + TheOrdersClass + ". The receiver is " + ByItem26; + + /// The reads the 8951 pool spells by a label of its own, with no Spelling, and no typed-read cell: keyed by + /// the label, each one the pool spells a must-run read under (), and no other. Found by + /// re-measuring the review's F2: six reads, dropped by the same filter as the third placements. + internal static readonly IReadOnlyDictionary ExcludedTypedReceivers = new Dictionary(StringComparer.Ordinal) + { + ["GenericReceiver"] = AGenericReceiver, + }; + + /// A reader of a kind: under which spelling, from which position and nesting, and whether it sits INSIDE the member's own type. + internal sealed record TypedReader(BindingKind Kind, Harness.Spelling Spelling, ReadPosition Position, Harness.Nesting Nesting, bool Inside); + + /// The positions a module-level reader is placed at; every other position is a member of a reader class. + internal static readonly IReadOnlySet ModulePlacedPositions = Enum.GetValues().Where(p => + { + try + { + Harness.PlaceAtModule(p, Harness.Nesting.Direct, "0"); + return true; + } + catch (ArgumentOutOfRangeException) + { + return false; + } + }).ToHashSet(); + + /// + /// Where a typed read of each kind is legal, READ from the 8951 pool: a (kind, spelling, position, nesting) is a reader exactly + /// when that pool spells a read of it that must run, declared before its reader, with no outer binding, in a class or at + /// module level (its sub-generators' routes are that pool's own axes). So the two axes are the images of Spelling and + /// under the pool's own rosters, and a position, nesting or spelling the pool gains for a kind is a + /// typed-read cell with no edit here. A reader stands in the member's own type or outside every type. The pool also reads from + /// a third type (a subclass, an unrelated type, a nested one), under labels of its own that carry no Spelling and no + /// order, so WHERE the reader stands is asked first: such a read is counted per placement + /// (), each placement is excluded with its reason (), + /// and a read from a placement with none is , which the axes fact holds empty. A read from + /// the two placements this set has that carries no Spelling is held the same way, by its label + /// (). One reader + /// the pool does not spell is added: an instance member read through its type's name is read off a constructed instance + /// (H().x, A().x), from wherever the pool reads a @static field through that name from outside its type. + /// + private static readonly Lazy<(IReadOnlyList Readers, IReadOnlyList Unplaced, IReadOnlyDictionary Third, IReadOnlyDictionary Labelled)> DerivedTypedReaders = new(() => + { + var readers = new HashSet(); + var unplaced = new List(); + var third = new SortedDictionary(); + var labelled = new SortedDictionary(StringComparer.Ordinal); + foreach (var c in Harness.GeneratedCells()) + { + // A read of a typed-read kind that must run, with no outer binding, at a position this set reads from, among the + // pool's unrouted cells. + if (c.Family != Family.Read || c.Tag != SharpyTag.MustRun || c.Outer != BindingKind.None || c.Position is not { } position + || c.Key is not { Route: null } key || !TypedReads.ContainsKey(c.Target) || ExcludedTypedPositions.ContainsKey(position)) + continue; + if (c.Relation is { } placement && placement != DeclaringRelation.Self) + { + third[placement] = third.GetValueOrDefault(placement) + 1; + if (!ExcludedTypedPlacements.ContainsKey(placement)) + unplaced.Add($"{c.Id} (relation {placement})"); + continue; + } + if (key.Part() is not { } spelling) + { + // Spelled by a label of the pool's own: counted and owed its reason, as a third placement is. + string label = string.Join("+", key.Marks); + labelled[label] = labelled.GetValueOrDefault(label) + 1; + if (!ExcludedTypedReceivers.ContainsKey(label)) + unplaced.Add($"{c.Id} (spelled by the label '{label}', which is no Spelling)"); + continue; + } + // The order is this set's own axis: a reader the pool runs above its member is generated at both orders. + if (key.Part() != Harness.Order.Earlier || ExcludedTypedSpellings.ContainsKey(spelling)) + continue; + readers.Add(new TypedReader(c.Target, spelling, position, key.Part() ?? Harness.Nesting.Direct, c.Relation == DeclaringRelation.Self)); + } + var instances = TypedReads.Where(t => t.Value.Level == MemberLevel.Instance).Select(t => t.Key).ToList(); + foreach (var r in readers.Where(r => r is { Kind: BindingKind.StaticField, Inside: false, Spelling: Harness.Spelling.Qualified or Harness.Spelling.Alias }).ToList()) + { + foreach (var instance in instances) + readers.Add(r with { Kind = instance }); + } + return (readers.OrderBy(r => r.Kind).ThenBy(r => r.Spelling).ThenBy(r => r.Position).ThenBy(r => r.Nesting).ThenBy(r => r.Inside).ToList(), unplaced, third, labelled); + }); + + internal static IReadOnlyList TypedReaders => DerivedTypedReaders.Value.Readers; + + /// The pool's must-run reads this set has no reader for and no reason against: the reader stands in a third type + /// under a placement with no exclusion, or the read is spelled by a label with none. + internal static IReadOnlyList UnplacedTypedReaders => DerivedTypedReaders.Value.Unplaced; + + /// How many must-run reads the pool spells from each third placement: what an exclusion of one rests on. + internal static IReadOnlyDictionary TypedThirdPlacements => DerivedTypedReaders.Value.Third; + + /// How many must-run reads the pool spells under each label that is no Spelling, from the member's own type + /// or outside every type. + internal static IReadOnlyDictionary TypedLabelledReads => DerivedTypedReaders.Value.Labelled; + + private const string AReadOfItself = "a declaration that reads itself, directly or through a ring, is N3-cycle's: refused or thrown whatever its slot's type (the 8951 pool's Self and Cycle cells)"; + private const string ARecursion = "a constructor that calls itself is a recursion, not an order of two declarations"; + private const string OverflowsTheCompiler = "#2769: named by an annotation, an alias whose target reaches the alias overflows the compiler's stack (`TypeResolver.ExpandTypeAlias`), and a process that dies leaves no verdict a cell can read (its probe compiles in a child process). The class is unruled and out of P78 (owner, #2423 comment 7042723494 item 9), so only the UNUSED alias has cells, and they keep running"; + + /// The orders with no cell, per cell set that has the axis: total over Order with the two every set generates. + internal static readonly IReadOnlyDictionary> ExcludedOrders = new Dictionary>(StringComparer.Ordinal) + { + ["typed-read"] = new Dictionary { [Harness.Order.Self] = AReadOfItself, [Harness.Order.Cycle] = AReadOfItself }, + ["init-overload"] = new Dictionary { [Harness.Order.Self] = ARecursion, [Harness.Order.Cycle] = ARecursion }, + ["alias-target"] = new Dictionary(), + ["constant-kind"] = new Dictionary { [Harness.Order.Self] = AReadOfItself, [Harness.Order.Cycle] = AReadOfItself }, + ["lambda-default"] = new Dictionary { [Harness.Order.Self] = AReadOfItself, [Harness.Order.Cycle] = AReadOfItself }, + }; + + /// The target × use pairs with no cell, total over the two enums with the pairs a cell carries. + internal static readonly IReadOnlyDictionary<(ScopeAliasTarget Target, ScopeAliasUse Use), string> ExcludedAliasUses = new Dictionary<(ScopeAliasTarget, ScopeAliasUse), string> + { + [(ScopeAliasTarget.Itself, ScopeAliasUse.Used)] = OverflowsTheCompiler, + }; + + /// The shapes whose name cannot be the alias itself, by label: every other shape has its self-reaching cells. + internal static readonly IReadOnlyDictionary ExcludedSelfReachingShapes = new Dictionary(StringComparer.Ordinal) + { + ["dotted"] = "the name is qualified by a module, and an alias is no member of one: `pathlib.K0` names nothing, which is the Missing cell", + }; + + // ------------------------------------------------------------------------------------------- // + // callee: binder × outer + // ------------------------------------------------------------------------------------------- // + + /// The statements that bind {n} to a function returning 1 and print its call, per binder. + internal static readonly IReadOnlyDictionary CalleeBinders = new Dictionary + { + [LocalTarget.For] = new[] { "for {n} in [one]:", " print({n}())" }, + [LocalTarget.Comprehension] = new[] { "print([{n}() for {n} in [one]][0])" }, + [LocalTarget.WithAs] = new[] { "with CM() as {n}:", " print({n}())" }, + }; + + /// The reason of a binder that could carry a callee cell and has none (the review of PR #2767, F1: the earlier + /// reasons said these bind nothing a call calls, which a typed subject refutes). Each rests on two programs. A switch and no + /// table: the probes' keys are built from it before any later field of this file is. + private static string ACalleeBinderIsOut(LocalTarget binder) + { + string binds = binder switch + { + LocalTarget.MatchCapture => "`case x:` over a function-typed local (`f: () -> int = one`, `match f:`)", + LocalTarget.AsPatternCapture => "`case _ as x:` over a function-typed local (`f: () -> int = one`, `match f:`)", + LocalTarget.OutLet => "`give(out let x)`, its parameter typed through an alias (`type F = () -> int`, `def give(f: out F)`)", + _ => throw new ArgumentOutOfRangeException(nameof(binder), binder, "a generated binder, or one with a reason of its own"), + }; + return $"{binds} binds a function value: called, the name prints `1` with no outer binding, and under a module `x: int = 12` the call is SPY0908 CS1955, the callee lookup's class the generated binders hold red (#2423, which holds the program as a cell). The binder is {ByItem26}"; + } + + private const string AnExceptionIsCalled = "`except E as x:` binds an exception, and one whose class declares `__call__` is called: `x()` prints `1` with and without a module `x: int = 12`. The binder is " + ByItem26 + ", and no tracker holds the program, since it is green"; + + private const string CallableException = "class E(Exception):\n def __call__(self) -> int:\n return 1\ndef main() -> None:\n try:\n raise E()\n except E as x:\n print(x())\n"; + + /// The probe of : the binder's statements in main under a module + /// x: int = 12 (the red program), and the same with no outer binding (its control, which runs). + private static BehaviourProbe CalleeBinderProbe(string statements, string declarations = "") + { + string program = $"{One}\n{declarations}{Main} {statements}\n"; + return new("x: int = 12\n" + program, "SPY0908 CS1955", r => Refused(r, "SPY0908", "CS1955"), Also: new[] { Prints(program, "1") }); + } + + internal static readonly IReadOnlyDictionary ExcludedCalleeBinders = new Dictionary + { + [LocalTarget.ExceptAs] = AnExceptionIsCalled, + [LocalTarget.MatchCapture] = ACalleeBinderIsOut(LocalTarget.MatchCapture), + [LocalTarget.AsPatternCapture] = ACalleeBinderIsOut(LocalTarget.AsPatternCapture), + [LocalTarget.OutLet] = ACalleeBinderIsOut(LocalTarget.OutLet), + }; + + /// Where an outer binding of the name sits against the binder: at module level (or nowhere, or the global scope), + /// as a member of the type whose method holds the binder, or as a local of the function whose nested def holds it. + internal enum OuterScope + { + Module, + Member, + Enclosing, + } + + /// An outer binding: the name both bindings share, its declaration, where it sits, whether python runs the same + /// program, and whether it imports the Stdlib. + internal sealed record OuterBinding(string Name, string Text, OuterScope Scope, bool Twin = false, bool Stdlib = false); + + /// The outer bindings of the callee, total over with : + /// every kind that can hold the name outside the binder's own scope. The outer's value is 12 and the binder's function + /// returns 1, so a call that reaches the outer binding prints something else or does not compile. + internal static readonly IReadOnlyDictionary CalleeOuters = new Dictionary + { + [BindingKind.None] = new("x", "", OuterScope.Module, Twin: true), + [BindingKind.ModuleVar] = new("x", "x: int = 12", OuterScope.Module, Twin: true), + [BindingKind.ModuleLiteralConst] = new("x", "const x: int = 12", OuterScope.Module), + [BindingKind.ModuleComputedConst] = new("x", "const x: int = twelve()", OuterScope.Module), + [BindingKind.ModuleProperty] = new("x", "property x: int = 12", OuterScope.Module), + [BindingKind.ModuleDef] = new("x", "def x() -> int:\n return 12", OuterScope.Module, Twin: true), + [BindingKind.ModuleClass] = new("x", "class x:\n v: int = 12", OuterScope.Module, Twin: true), + [BindingKind.ModuleStruct] = new("x", "struct x:\n v: int = 12", OuterScope.Module), + [BindingKind.ModuleEnum] = new("x", "enum x:\n RED = 12", OuterScope.Module), + [BindingKind.ModuleUnion] = new("x", "union x:\n case A(v: int)", OuterScope.Module), + [BindingKind.ModuleInterface] = new("x", "interface x:\n def m(self) -> int: ...", OuterScope.Module), + [BindingKind.ModuleTypeAlias] = new("x", "class Tgt:\n v: int = 12\ntype x = Tgt", OuterScope.Module), + [BindingKind.Builtin] = new("abs", "", OuterScope.Module, Twin: true), + [BindingKind.ImportedName] = new("floor", "from math import floor", OuterScope.Module, Stdlib: true), + [BindingKind.StaticField] = new("x", "@static\nx: int = 12", OuterScope.Member), + [BindingKind.StaticProperty] = new("x", "@static\nproperty x: int = 12", OuterScope.Member), + [BindingKind.StaticMethod] = new("x", "@static\ndef x() -> int:\n return 12", OuterScope.Member), + [BindingKind.ClassLiteralConst] = new("x", "const x: int = 12", OuterScope.Member), + [BindingKind.ClassComputedConst] = new("x", "const x: int = twelve()", OuterScope.Member), + [BindingKind.NestedType] = new("x", "class x:\n v: int = 12", OuterScope.Member), + [BindingKind.InstanceField] = new("x", "x: int = 12", OuterScope.Member), + [BindingKind.InstanceProperty] = new("x", "property x: int = 12", OuterScope.Member), + [BindingKind.InstanceMethod] = new("x", "def x(self) -> int:\n return 12", OuterScope.Member), + [BindingKind.EnclosingLocal] = new("x", "x: int = 12", OuterScope.Enclosing, Twin: true), + [BindingKind.Parameter] = new("x", "", OuterScope.Enclosing), + [BindingKind.LocalLet] = new("x", "let x = 12", OuterScope.Enclosing), + [BindingKind.LocalLiteralConst] = new("x", "const x: int = 12", OuterScope.Enclosing), + [BindingKind.LocalComputedConst] = new("x", "const x: int = twelve()", OuterScope.Enclosing), + [BindingKind.LocalDef] = new("x", "def x() -> int:\n return 12", OuterScope.Enclosing), + [BindingKind.LambdaTypedLocal] = new("x", "x: () -> int = lambda: 12", OuterScope.Enclosing), + }; + + internal static readonly IReadOnlyDictionary ExcludedCalleeOuters = new Dictionary + { + [BindingKind.ModuleLet] = ModuleLetRefused, + [BindingKind.Constructor] = "`__init__` is called through its type's name: the ModuleClass and NestedType cells", + [BindingKind.Inner] = "binds only inside its own lambda or comprehension, where no statement binder sits; a comprehension target over it is the same target", + [BindingKind.LocalVar] = "seen from the nested def that holds the binder it IS EnclosingLocal, which is generated; in the binder's own function it is S2's target reuse (P80)", + }; + + // ------------------------------------------------------------------------------------------- // + // constant-kind (#2432): reader site × host × kind + // ------------------------------------------------------------------------------------------- // + + /// A host of a constant position: its label, the program around {e} typed {T} (with {s} where + /// main shows the slot's value, read into the local v), the code its refusal carries, the 8951 pool's position + /// where it has one, the imports the program itself needs, whether the program prints 1 and not the value, whether + /// it takes an int only, whether its slot can be given a function type, and whether python has the same position. + /// is the same slot in the read member's OWN type H: the member's declaration stands at + /// {above} or {below}, and {after} holds what follows the type. : that slot sits + /// in a method's body, where self is bound and a class member is not visible bare (N1). A host with no such slot + /// says why in . : the member's own type is an interface there + /// (). + internal sealed record ConstantHost(string Label, string Program, string Refusal, ReadPosition? Position = null, string? Imports = null, bool PrintsOne = false, + bool IntOnly = false, bool NoCallableSlot = false, bool Twin = false, string? Inside = null, bool InMethod = false, string? NoInside = null, bool Interface = false); + + /// main for a host whose slot is read by , after . + private static string ShowIn(string read, string before = "") => $"{Main}{before} v: {{T}} = {read}\n print({{s}})"; + + private const string AttributeTarget = " def f(self) -> int:\n return 1\n" + Main + " print(H().f())"; + + /// The attribute hosts' program with the member's own slots: {above} and {below} around the attributed method. + private const string AttributeTargetInside = " def f(self) -> int:\n return 1\n{below}{after}" + Main + " print(H().f())"; + + private const string AModuleConstIsOutsideEveryType = "a `const` at module level stands outside every type by definition: in the member's own type the same declaration is the class-const, struct-const or interface-const host"; + + private const string DelegateHasNoBody = "a `delegate` declaration is a signature on one line (`delegate D(x: int) -> int`, `DelegateDef`): it has no body to hold a member, a `const` or an alias (SPY0100)"; + private const string EnumBodyHoldsNoConst = "an enum body holds `NAME = value` cases and nothing else: a `const` there is SPY0101"; + private const string UnionBodyHoldsNoConst = "a union body holds cases and methods and nothing else: a `const` there is SPY0104"; + private const string NotADeclarationScope = "the scope of an initializer EXPRESSION's own locals: a declaration statement is no expression"; + private const string HoldsTypeParameters = "pushed to hold type parameters for one resolution step: it declares nothing a program writes"; + + /// Where a const is declared, total over ScopeKind with : the one + /// classifier call that judges a const initializer (ConstEligibility.Compute) judges it at every scope a + /// declaration can stand in. A type body is refined by . + internal static readonly IReadOnlyDictionary ConstSites = new Dictionary + { + [ScopeKind.Module] = new[] { new ConstantHost("module-const", "const K: {T} = {e}\n" + ShowIn("K"), "SPY0401", NoInside: AModuleConstIsOutsideEveryType) }, + [ScopeKind.TypeBody] = Array.Empty(), + [ScopeKind.FunctionLike] = new[] + { + new ConstantHost("local-const", ShowIn("K", " const K: {T} = {e}\n"), "SPY0401", + Inside: "class H:\n{above} def r(self) -> {T}:\n const K: {T} = {e}\n return K\n{below}{after}" + ShowIn("H().r()"), InMethod: true), + }, + [ScopeKind.Block] = new[] + { + new ConstantHost("block-const", $"{Main} if True:\n const K: {{T}} = {{e}}\n v: {{T}} = K\n print({{s}})", "SPY0401", + Inside: "class H:\n{above} def r(self) -> None:\n if True:\n const K: {T} = {e}\n v: {T} = K\n print({s})\n{below}{after}" + Main + " H().r()", InMethod: true), + }, + }; + + internal static readonly IReadOnlyDictionary ExcludedConstScopes = new Dictionary + { + [ScopeKind.InitializerHost] = NotADeclarationScope, + [ScopeKind.Transparent] = HoldsTypeParameters, + }; + + /// The type bodies a const is declared in, total over TypeKind with . + internal static readonly IReadOnlyDictionary ConstTypeHosts = new Dictionary + { + [TypeKind.Class] = new[] + { + new ConstantHost("class-const", "class H:\n const K: {T} = {e}\n" + ShowIn("H.K"), "SPY0401", ReadPosition.ConstInitializer, + Inside: "class H:\n{above} const K: {T} = {e}\n{below}{after}" + ShowIn("H.K")), + }, + [TypeKind.Struct] = new[] + { + new ConstantHost("struct-const", "struct H:\n const K: {T} = {e}\n w: int = 1\n" + ShowIn("H.K"), "SPY0401", + Inside: "struct H:\n{above} const K: {T} = {e}\n w: int = 1\n{below}{after}" + ShowIn("H.K")), + }, + [TypeKind.Interface] = new[] + { + new ConstantHost("interface-const", "interface H:\n const K: {T} = {e}\n def m(self) -> int: ...\n" + ShowIn("H.K"), "SPY0401", + Inside: "interface H:\n{above} const K: {T} = {e}\n def m(self) -> int: ...\n{below}{after}" + ShowIn("H.K"), Interface: true), + }, + }; + + internal static readonly IReadOnlyDictionary ExcludedConstTypeHosts = new Dictionary + { + [TypeKind.Enum] = EnumBodyHoldsNoConst, + [TypeKind.Union] = UnionBodyHoldsNoConst, + [TypeKind.Delegate] = DelegateHasNoBody, + }; + + internal static IEnumerable AllConstSites() + => ConstSites.OrderBy(e => e.Key).SelectMany(e => e.Key == ScopeKind.TypeBody ? ConstTypeHosts.OrderBy(h => h.Key).SelectMany(h => h.Value) : e.Value); + + private const string OutsideOneFile = "the cross-module route: `ModuleLoader` judging a const another module of a project exports, with no SemanticInfo; this type compiles one file, and the route is plan-777361's hand control (A3)"; + + /// + /// The hosts of a constant position, keyed by the READER that judges them: a call site of + /// ConstantDefaultClassifier.IsAdmitted, as finds it in the compiler's source + /// (File:Method, #n for a method's nth site; a site whose table is its method's parameter is counted at each + /// caller that passes one). Total over that census with , so a reader the compiler gains + /// has no host here and is red, and a reader whose host is deleted is red too (the owner's ruling 8 of 2026-11-20). A host's + /// AdmissionTable is READ from its reader's call, never written here. + /// + internal static readonly IReadOnlyDictionary ConstantReaders = new Dictionary(StringComparer.Ordinal) + { + ["ConstantPositionValidator.cs:ValidateFunctionDefaults"] = new[] + { + new ConstantHost("def", "def f(p: {T} = {e}) -> {T}:\n return p\n" + ShowIn("f()"), "SPY0401", ReadPosition.ParameterDefault, Twin: true, + Inside: "class H:\n{above} def f(self, p: {T} = {e}) -> {T}:\n return p\n{below}{after}" + ShowIn("H().f()")), + }, + ["ConstantPositionValidator.cs:ValidateLambdaDefaults"] = new[] + { + new ConstantHost("lambda", ShowIn("f()", " f = lambda p: {T} = {e}: p\n"), "SPY0401", NoCallableSlot: true, + Inside: "class H:\n{above} def r(self) -> {T}:\n f = lambda p: {T} = {e}: p\n return f()\n{below}{after}" + ShowIn("H().r()"), InMethod: true), + }, + // The two loops of one method: an attribute's positional arguments, then its named ones. + ["ConstantPositionValidator.cs:ValidateDecoratorConstantArguments"] = new[] + { + new ConstantHost("attribute", "class H:\n @[system.component_model.default_value({e})]\n" + AttributeTarget, "SPY0425", PrintsOne: true, + Inside: "class H:\n{above} @[system.component_model.default_value({e})]\n" + AttributeTargetInside), + }, + ["ConstantPositionValidator.cs:ValidateDecoratorConstantArguments#2"] = new[] + { + new ConstantHost("attribute-keyword", "class Mark(Attribute):\n w: object = 0\nclass H:\n @[Mark(w={e})]\n" + AttributeTarget, "SPY0425", + Imports: "from system import Attribute", PrintsOne: true, + Inside: "class Mark(Attribute):\n w: object = 0\nclass H:\n{above} @[Mark(w={e})]\n" + AttributeTargetInside), + }, + ["ConstantPositionValidator.cs:ValidateDataclassFieldDefaults"] = new[] + { + new ConstantHost("dataclass", "@dataclass\nclass H:\n p: {T} = {e}\n" + ShowIn("H().p"), "SPY0401", ReadPosition.DataclassFieldInitializer, Twin: true, + Inside: "@dataclass\nclass H:\n{above} p: {T} = {e}\n{below}{after}" + ShowIn("H().p")), + }, + ["ConstantPositionValidator.cs:ValidateStructFieldDefaults"] = new[] + { + new ConstantHost("struct", "struct H:\n p: {T} = {e}\n" + ShowIn("H().p"), "SPY0401", ReadPosition.StructFieldInitializer, Twin: true, + Inside: "struct H:\n{above} p: {T} = {e}\n{below}{after}" + ShowIn("H().p")), + }, + ["ConstEligibility.cs:Compute"] = AllConstSites().ToArray(), + // A struct's defaulted auto-property (#1938): a constant default becomes the synthesized constructor's parameter default, + // and any other default keeps its initializer, so every expression must run here (ruling 8). + ["CodeGenInfoComputer.cs:MarkStructConstructorProperty"] = new[] + { + new ConstantHost("struct-auto-property", "struct H:\n property p: {T} = {e}\n" + ShowIn("H().p"), "SPY0401", + Inside: "struct H:\n{above} property p: {T} = {e}\n{below}{after}" + ShowIn("H().p")), + }, + }; + + internal static readonly IReadOnlyDictionary ExcludedConstantReaders = new Dictionary(StringComparer.Ordinal) + { + ["ConstEligibility.cs:IsExportedConstCompileTime"] = OutsideOneFile, + }; + + internal static readonly IReadOnlyDictionary ExcludedAdmissionTables = new Dictionary(); + + /// A constant position no classifier call judges, and the one such position this set generates: an enum member's + /// value. A table value added for it has no reader here, which is red until this host moves under it. It is not the only + /// position without a classifier call (/verify-plan pass 4, finding 2): a delegate's parameter default, a + /// signature-only interface method's default, a bracket attribute on anything but a class's method, and a union's attribute + /// arguments have none either. Those hosts are #2779's group, out of plan-777361 by the owner's decision (#2423 comment + /// 7050154806, item 22): no host is generated for them here, and the census of call sites cannot see them. + internal static readonly ConstantHost EnumMemberHost = new("enum-member", $"enum H:\n RED = {{e}}\n{Main} print(H.RED.value)", "SPY0401", ReadPosition.EnumMemberValue, IntOnly: true, + NoInside: EnumBodyHoldsCases); + + /// Every host with the table its reader passes; the enum member's value last, with none. + internal static IEnumerable<(AdmissionTable? Table, ConstantHost Host)> AllConstantHosts() + { + var census = ClassifierReaders.Value.Sites; + return ConstantReaders.Where(r => census.ContainsKey(r.Key)) + .SelectMany(r => r.Value.Select(h => (Table: (AdmissionTable?)census[r.Key], Host: h))) + .OrderBy(h => h.Table).ThenBy(h => h.Host.Label, StringComparer.Ordinal) + .Append((Table: null, Host: EnumMemberHost)); + } + + // The lambda host is the `lambda` spelling (`ConstantReaders`), and both reasons are true of that spelling alone (the review + // of PR #2767, F10): the arrow spelling takes both slots, and the constant-kind set has no arrow-lambda host. + private const string LambdaTakesNoCallableSlot = "the host's lambda is the `lambda` spelling, whose parameter annotation cannot be a function type and take a default: `lambda p: () -> int = five: p` is SPY0103. The arrow spelling takes one: `(p: () -> int = five) -> p` is SPY0401, the refusal the position owes, and `(p: (float) -> float = math.sqrt) -> p` is SPY0908 CS1736, the defect the `def` host's cell holds red for the same member (#2432, which holds the program as a cell). An arrow-lambda host is " + ByItem26; + private const string LambdaTakesOneNameForAType = "the host's lambda is the `lambda` spelling, whose parameter annotation is one name: a type spelled through its module (`lambda p: system.DayOfWeek: p`) is SPY0103 with no default at all, so the slot cannot be declared there and the parse error is no constant position's verdict; the same type under a from-import is generated. The arrow spelling takes the dotted type and runs (`(p: system.DayOfWeek = system.DayOfWeek.Monday) -> p` prints `DayOfWeek.Monday`): an arrow-lambda host is " + ByItem26 + ", and no tracker holds that program, since it is green"; + private const string AnIntEnum = "the host is an int enum, whose member's value is an int: a `str` value declares a string enum, another host, and any other type is SPY0253"; + + /// Why a host has no cell for a slot of , or null when it has one. + internal static string? HostSkips(ConstantHost host, string type) + => host.IntOnly && type != "int" ? AnIntEnum + : host.NoCallableSlot && type.Contains("->", StringComparison.Ordinal) ? LambdaTakesNoCallableSlot + : host.NoCallableSlot && type.Contains('.', StringComparison.Ordinal) ? LambdaTakesOneNameForAType + : null; + + /// The expression: its label, text, type and what it prints; the import line and the declarations it needs; how + /// main shows a value of its type ({0} the read); the codes its own kind's refusal carries beside the host's; + /// the binding kind a bare name of it has; the member of a referenced module it names (module.name, what + /// is keyed by) or the member of a referenced type; its read form where it has one; and + /// the spelling it is read under (, , , + /// ), which is a part of its cell's id. + internal sealed record ConstantExpression(string Label, string Text, string Type, string Prints, string? Import = null, string? Prelude = null, string Show = "{0}", + string[]? Refusals = null, BindingKind Target = BindingKind.None, string? ModuleValue = null, Type? Owner = null, string? Member = null, Harness.Form? Form = null, + string? Spelling = null) + { + public bool Stdlib => ModuleValue != null; + } + + /// + /// How a program names what it imports: the image of the two enumerations the compiler keeps for it. + /// ImportBindingForm is the statement that bound the name (import m, import m as N, a from-import, whose + /// record also says whether it was a star: ImportBinding.IsStar), and ImportKind how the imported symbol is + /// then read (through its module, by its own name, by an alias). {m} is the module, {n} the name; + /// is the spelling of {n} a read uses. A spelling changes no verdict (N7), and a missing one has no cell + /// (). + /// + internal sealed record ImportSpelling(string Label, ImportBindingForm Form, ImportKind Kind, bool Star, string Import, string Read); + + internal static readonly IReadOnlyList ImportSpellings = new[] + { + new ImportSpelling("import", ImportBindingForm.ModuleRoot, ImportKind.ModuleImport, false, "import {m}", "{m}.{n}"), + new ImportSpelling("import-as", ImportBindingForm.ModuleAlias, ImportKind.ModuleImport, false, "import {m} as m0", "m0.{n}"), + new ImportSpelling("from-import", ImportBindingForm.FromImport, ImportKind.FromImport, false, "from {m} import {n}", "{n}"), + new ImportSpelling("from-import-as", ImportBindingForm.FromImport, ImportKind.FromImportWithAlias, false, "from {m} import {n} as n0", "n0"), + new ImportSpelling("star-import", ImportBindingForm.FromImport, ImportKind.FromImport, true, "from {m} import *", "{n}"), + }; + + internal static readonly IReadOnlyDictionary ExcludedImportKinds = new Dictionary + { + [ImportKind.None] = "not imported: the program's own names, which have their own spellings (OwnSpellings)", + }; + + /// A referenced type named through an alias the program declares (type A = Math): the 8951 pool's + /// Spelling.Alias, for a type no program declares. + internal const string TypeAliasSpelling = "type-alias"; + + /// A referenced type named by the builtin name it has (int for System.Int32). + internal const string BuiltinNameSpelling = "builtin-name"; + + private static string Spell(string template, string module, string name) + => template.Replace("{m}", module, StringComparison.Ordinal).Replace("{n}", name, StringComparison.Ordinal); + + /// A member of a referenced module, before a spelling: a value or a function, read uncalled. + internal sealed record ModuleMember(string Module, string Name, string Type, string Prints, string Show = "{0}", Harness.Form? Form = null); + + /// The members of referenced modules a constant position is handed, one or two per kind (a hand choice: each is + /// checked against what discovery records for it, ); every one is read under every + /// entry. + internal static readonly IReadOnlyDictionary ModuleMembers = new Dictionary + { + [ScopeConstantKind.ClrLiteralField] = new[] { new ModuleMember("subprocess", "PIPE", "int", "-1") }, + [ScopeConstantKind.StdlibModuleVariable] = new[] { new ModuleMember("socket", "AF_INET", "int", "2"), new ModuleMember("math", "pi", "float", "3.141592653589793") }, + [ScopeConstantKind.ClrStaticMember] = new[] { new ModuleMember("sys", "maxsize", "int", "2147483647") }, + [ScopeConstantKind.ModuleFunction] = new[] { new ModuleMember("math", "sqrt", "(float) -> float", "5.0", "{0}(25.0)", Harness.Form.Value) }, + [ScopeConstantKind.ModuleFunctionGroup] = new[] { new ModuleMember("math", "log", "(float) -> float", "0.0", "{0}(1.0)", Harness.Form.Value) }, + }; + + /// A member of a referenced type, before a spelling: the module that exports the type, the type's name there, its + /// builtin name where it has one, and the member. {R} in is the type as the spelling names it. + internal sealed record TypeMemberBase(string Module, string TypeName, Type Owner, string Member, string Type, string Prints, string Show = "{0}", + string[]? Refusals = null, Harness.Form? Form = null, string? BuiltinName = null); + + /// The members of referenced types a constant position is handed, one or two per kind (a hand choice: each is + /// checked against what the checker's resolver answers for it); every one is read under every + /// entry of its type, through an alias of the type, and by the type's builtin name where it has one: + /// a type of the compiler's PrimitiveCatalog, read by one of the names the catalog gives it, or + /// says why the name is no receiver ( holds the three together). + internal static readonly IReadOnlyDictionary TypeMembers = new Dictionary + { + [ScopeConstantKind.ClrTypeLiteralField] = new[] + { + new TypeMemberBase("system", "Int32", typeof(int), "max_value", "int", "2147483647", BuiltinName: "int"), + new TypeMemberBase("system", "Math", typeof(Math), "PI", "float", "3.141592653589793"), + }, + [ScopeConstantKind.ClrTypeDecimalConstant] = new[] { new TypeMemberBase("system", "Decimal", typeof(decimal), "one", "decimal", "1", BuiltinName: "decimal") }, + [ScopeConstantKind.ClrTypeEnumMember] = new[] { new TypeMemberBase("system", "DayOfWeek", typeof(DayOfWeek), "Monday", "{R}", "DayOfWeek.Monday") }, + [ScopeConstantKind.ClrTypeStaticField] = new[] + { + new TypeMemberBase("system", "BitConverter", typeof(BitConverter), "is_little_endian", "bool", "True"), + new TypeMemberBase("system", "String", typeof(string), "empty", "str", "True", "{0} == \"\"", BuiltinName: "str"), + }, + [ScopeConstantKind.ClrTypeStaticProperty] = new[] { new TypeMemberBase("system", "Array", typeof(Array), "max_length", "int", "2147483591") }, + [ScopeConstantKind.ClrTypeMethod] = new[] { new TypeMemberBase("system", "Math", typeof(Math), "sqrt", "(float) -> float", "5.0", "{0}(25.0)", Form: Harness.Form.Value) }, + [ScopeConstantKind.ClrTypeDeclinedMethod] = new[] { new TypeMemberBase("system", "Char", typeof(char), "is_ascii_digit", "object", "True", "{0} is not None", Form: Harness.Form.Value) }, + // The slot's function type selects the overload (the owner's ruling 29, #2423 comment 7052893050), so the read is a + // function value like `Math.sqrt`. SPY0336 is what every read of the group answers today (#2277), and it stays the + // answer where no function type stands at the slot: an attribute argument. + [ScopeConstantKind.ClrTypeMethodGroup] = new[] + { + new TypeMemberBase("system", "Math", typeof(Math), "abs", "(int) -> int", "5", "{0}(-5)", new[] { "SPY0336" }, Harness.Form.Value), + }, + }; + + private const string CharNamesNoReceiver = "`char` names a type in an annotation and nothing in an expression: `char.is_ascii_digit` is SPY0200, so a member of `Char` is read through the type's own name alone"; + + /// The primitive types whose builtin name is no receiver of a member read, each with its probe. + internal static readonly IReadOnlyDictionary ExcludedBuiltinReceivers = new Dictionary + { + [typeof(char)] = CharNamesNoReceiver, + }; + + /// The enum reads, total over EnumMemberAccessKind (which half of which enum shape a .name / .value + /// read takes) and the member itself per shape, which has no access kind. + internal static readonly IReadOnlyDictionary EnumReadKinds = new Dictionary + { + [ScopeConstantKind.IntEnumMember] = (true, null), + [ScopeConstantKind.IntEnumValue] = (true, EnumMemberAccessKind.IntValue), + [ScopeConstantKind.IntEnumName] = (true, EnumMemberAccessKind.IntName), + [ScopeConstantKind.StringEnumMember] = (false, null), + [ScopeConstantKind.StringEnumValue] = (false, EnumMemberAccessKind.StringValue), + [ScopeConstantKind.StringEnumName] = (false, EnumMemberAccessKind.StringName), + }; + + private const string IntEnum = "enum E0:\n RED = 5"; + private const string StringEnum = "enum E0:\n RED = \"r\""; + + /// The reads of the program's own enum, before a spelling: {E} is the enum as the spelling names it. + private static readonly IReadOnlyDictionary EnumReads = new Dictionary + { + [ScopeConstantKind.IntEnumMember] = new("member", "{E}.RED", "E0", "5", Prelude: IntEnum, Show: "{0}.value", Target: BindingKind.ModuleEnum), + [ScopeConstantKind.IntEnumValue] = new("value", "{E}.RED.value", "int", "5", Prelude: IntEnum, Target: BindingKind.ModuleEnum, Form: Harness.Form.EnumValue), + [ScopeConstantKind.IntEnumName] = new("name", "{E}.RED.name", "str", "RED", Prelude: IntEnum, Target: BindingKind.ModuleEnum), + [ScopeConstantKind.StringEnumMember] = new("member", "{E}.RED", "E0", "r", Prelude: StringEnum, Show: "{0}.value", Target: BindingKind.ModuleEnum), + [ScopeConstantKind.StringEnumValue] = new("value", "{E}.RED.value", "str", "r", Prelude: StringEnum, Target: BindingKind.ModuleEnum, Form: Harness.Form.EnumValue), + [ScopeConstantKind.StringEnumName] = new("name", "{E}.RED.name", "str", "RED", Prelude: StringEnum, Target: BindingKind.ModuleEnum), + }; + + /// How the program's own enum is named, total over the 8951 pool's Spelling with + /// : its label in a cell's id, the receiver, and the declaration the spelling needs. + internal static readonly IReadOnlyDictionary EnumSpellings = new Dictionary + { + [Harness.Spelling.Qualified] = ("type-name", "E0", null), + [Harness.Spelling.Alias] = (TypeAliasSpelling, "A", "type A = E0"), + }; + + private const string ASiblingCaseIsNoName = "bare, a case is in scope nowhere: outside its enum it is read through the enum, and inside (`BLUE = RED`) it is SPY0200 today, which is #2069's cell and outside plan-777361"; + + internal static readonly IReadOnlyDictionary ExcludedEnumSpellings = new Dictionary + { + [Harness.Spelling.Bare] = ASiblingCaseIsNoName, + [Harness.Spelling.Call] = ACallByShape, + [Harness.Spelling.SelfDot] = EnumBodyHoldsCases, + }; + + private static string AliasedIntEnumRead(EnumMemberAccessKind access) + => $"through an alias of its enum (`type A = E0`), an int enum member's {access} read is SPY0908 CS1061 in a function's body, with no constant position in sight (the member is taken for an instance's field, SPY0459): a cell would hold that defect and no constant position's verdict. The member itself (`A.RED`) and a string enum's reads run there and are generated"; + + /// Why a read of the program's enum has no cell under a spelling the enum has, or null when it has one. + internal static string? EnumReadSkips(Harness.Spelling spelling, ScopeConstantKind kind) + => spelling == Harness.Spelling.Alias && EnumReadKinds[kind] is (true, { } access) ? AliasedIntEnumRead(access) : null; + + /// + /// What a constant position is handed, per kind: every member of and + /// under every spelling it has, every enum read under every spelling of the enum, and the two chains. GENERATED from those + /// lists, so a spelling is on every member or on none. + /// + internal static readonly IReadOnlyDictionary ConstantExpressions = BuildConstantExpressions(); + + private static IReadOnlyDictionary BuildConstantExpressions() + { + var all = new Dictionary(); + foreach (var (kind, members) in ModuleMembers) + { + all[kind] = members.SelectMany(m => ImportSpellings.Select(s => new ConstantExpression($"{m.Module}.{m.Name}", Spell(s.Read, m.Module, m.Name), m.Type, m.Prints, + Import: Spell(s.Import, m.Module, m.Name), Show: m.Show, Target: s.Form == ImportBindingForm.FromImport ? BindingKind.ImportedName : BindingKind.None, + ModuleValue: $"{m.Module}.{m.Name}", Form: m.Form, Spelling: s.Label))).ToArray(); + } + foreach (var (kind, members) in TypeMembers) + { + var expressions = new List(); + foreach (var m in members) + { + ConstantExpression Named(string spelling, string receiver, string? import, string? prelude = null) + => new($"{m.TypeName}.{m.Member}", $"{receiver}.{m.Member}", m.Type.Replace("{R}", receiver, StringComparison.Ordinal), m.Prints, Import: import, Prelude: prelude, + Show: m.Show, Refusals: m.Refusals, Owner: m.Owner, Member: m.Member, Form: m.Form, Spelling: spelling); + expressions.AddRange(ImportSpellings.Select(s => Named(s.Label, Spell(s.Read, m.Module, m.TypeName), Spell(s.Import, m.Module, m.TypeName)))); + expressions.Add(Named(TypeAliasSpelling, "A", $"from {m.Module} import {m.TypeName}", $"type A = {m.TypeName}")); + if (m.BuiltinName != null) + expressions.Add(Named(BuiltinNameSpelling, m.BuiltinName, null)); + } + all[kind] = expressions.ToArray(); + } + foreach (var (kind, read) in EnumReads) + { + all[kind] = EnumSpellings.OrderBy(s => s.Key).Where(s => EnumReadSkips(s.Key, kind) == null).Select(s => read with + { + Text = read.Text.Replace("{E}", s.Value.Receiver, StringComparison.Ordinal), + Prelude = s.Value.Declares == null ? read.Prelude : read.Prelude + "\n" + s.Value.Declares, + Spelling = s.Value.Label, + }).ToArray(); + } + all[ScopeConstantKind.ComparisonChain] = new[] { new ConstantExpression("ordered", "1 < 2 < 3", "bool", "True") }; + all[ScopeConstantKind.ChainWithNonConstantLink] = new[] { new ConstantExpression("membership", "0 < 2 in [1, 2]", "bool", "True") }; + return all; + } + + private const string LiteralValueShape = nameof(ModuleOverloads.Fields) + "/literal"; + private const string GuardedValueShape = nameof(ModuleOverloads.Fields) + "/guarded"; + private const string StaticValueShape = nameof(ModuleOverloads.Fields) + "/static"; + private const string GuardedLiteralShape = nameof(ModuleOverloads.Fields) + "/literal+guarded"; + private const string OneFunctionShape = nameof(ModuleOverloads.Functions) + "/one"; + private const string FunctionGroupShape = nameof(ModuleOverloads.Functions) + "/group"; + private const string ModuleTypeShape = nameof(ModuleOverloads.Types); + + /// + /// What discovery records for a member of a referenced module, and the kind that is its image (the owner's ruling 13 of + /// 2026-11-20, #2423 comment 7046304965): the collection of ModuleOverloads that holds the member, refined by the + /// facts a constant position's answer can read: a field's FieldSignature.IsConst × IsGuarded, and whether a + /// function's name has one overload or several. Total over the shapes a census of the Stdlib finds + /// () with ; the collections themselves are total + /// over the properties of ModuleOverloads with . + /// + internal static readonly IReadOnlyDictionary ModuleMemberShapes = new Dictionary(StringComparer.Ordinal) + { + [LiteralValueShape] = ScopeConstantKind.ClrLiteralField, + [GuardedValueShape] = ScopeConstantKind.StdlibModuleVariable, + [StaticValueShape] = ScopeConstantKind.ClrStaticMember, + [OneFunctionShape] = ScopeConstantKind.ModuleFunction, + [FunctionGroupShape] = ScopeConstantKind.ModuleFunctionGroup, + }; + + private const string NamesAModuleType = "names a type the module exports: handed to a slot of another type it is the checker's own mismatch (SPY0220), and a member read through it is a referenced type's member, which has its own kinds (ClrTypeMemberShapes)"; + + /// The shapes with no cell. are those the census must hold at 0. + internal static readonly IReadOnlyDictionary ExcludedModuleMemberShapes = new Dictionary(StringComparer.Ordinal) + { + [GuardedLiteralShape] = "a literal has no storage to guard", + [ModuleTypeShape] = NamesAModuleType, + }; + + internal static readonly IReadOnlySet UnproducedModuleMemberShapes = new HashSet(StringComparer.Ordinal) { GuardedLiteralShape }; + + private const string DescribesTheModule = "describes the module itself (its name, its documentation, where its C# lives, how it loads): it holds no member a program reads"; + + /// The properties of ModuleOverloads that hold no member kind, total with the three collections the shapes are keyed by. + internal static readonly IReadOnlyDictionary ExcludedModuleCollections = new Dictionary(StringComparer.Ordinal) + { + [nameof(ModuleOverloads.ModuleName)] = DescribesTheModule, + [nameof(ModuleOverloads.Documentation)] = DescribesTheModule, + [nameof(ModuleOverloads.CSharpNamespace)] = DescribesTheModule, + [nameof(ModuleOverloads.CSharpClassName)] = DescribesTheModule, + [nameof(ModuleOverloads.LoadEntry)] = DescribesTheModule, + }; + + /// Every member of every module of the Stdlib, as discovery records it: module.name and its shape. + private static readonly Lazy> StdlibModuleMembers = new(() => + { + var index = new OverloadIndexBuilder().BuildFromAssembly(SharpyStdlibReference.Assembly); + var members = new Dictionary(StringComparer.Ordinal); + foreach (var (module, overloads) in index.Modules) + { + foreach (var (name, field) in overloads.Fields) + members[$"{module}.{name}"] = field.IsConst ? field.IsGuarded ? GuardedLiteralShape : LiteralValueShape : field.IsGuarded ? GuardedValueShape : StaticValueShape; + foreach (var (name, signatures) in overloads.Functions) + members.TryAdd($"{module}.{name}", signatures.Count == 1 ? OneFunctionShape : FunctionGroupShape); + foreach (var type in overloads.Types) + members.TryAdd($"{module}.{type.Name}", ModuleTypeShape); + } + return members; + }); + + private const string LiteralFieldShape = "Field/literal"; + private const string EnumFieldShape = "Field/enum"; + private const string DecimalConstantShape = "Field/decimal-constant"; + private const string StaticFieldShape = "Field/static"; + + /// + /// What the checker's resolver of a referenced type's member (ClrMemberTypeResolver) answers for a member read through + /// the type, and the kind that is its image: the subclasses of ClrMemberResolution, by name, with a field refined by + /// the facts reflection has and discovery does not: what C# reads as a constant from metadata (FieldInfo.IsLiteral, + /// or a DecimalConstantAttribute on a static readonly field, which is how a const decimal is compiled: + /// ; the owner's ruling 17), and a literal of an enum type is the enum's member. Total over + /// those subclasses with . + /// + internal static readonly IReadOnlyDictionary ClrTypeMemberShapes = new Dictionary(StringComparer.Ordinal) + { + [LiteralFieldShape] = ScopeConstantKind.ClrTypeLiteralField, + [DecimalConstantShape] = ScopeConstantKind.ClrTypeDecimalConstant, + [EnumFieldShape] = ScopeConstantKind.ClrTypeEnumMember, + [StaticFieldShape] = ScopeConstantKind.ClrTypeStaticField, + [nameof(ClrMemberResolution.Property)] = ScopeConstantKind.ClrTypeStaticProperty, + [nameof(ClrMemberResolution.Method)] = ScopeConstantKind.ClrTypeMethod, + [nameof(ClrMemberResolution.MethodGroup)] = ScopeConstantKind.ClrTypeMethodGroup, + [DeclinedMethodShape] = ScopeConstantKind.ClrTypeDeclinedMethod, + }; + + // The two answers that say nothing of the member, refined by what reflection finds under the name: the resolver's own + // reasons for giving them (`ClrMemberTypeResolver.ResolveCore`). + private const string DeclinedMethodShape = nameof(ClrMemberResolution.InconclusiveResult) + "/static-method"; + private const string DeclinedValueShape = nameof(ClrMemberResolution.InconclusiveResult) + "/static-value"; + private const string OppositeHalfShape = nameof(ClrMemberResolution.InconclusiveResult) + "/instance-half"; + private const string GenericMethodShape = nameof(ClrMemberResolution.AbsentResult) + "/generic-method"; + private const string NoMemberShape = nameof(ClrMemberResolution.AbsentResult) + "/none"; + + /// The refinements of the two answers, which partitions the resolver's subclasses with. + internal static readonly IReadOnlyDictionary RefinedClrTypeMemberShapes = new Dictionary(StringComparer.Ordinal) + { + [nameof(ClrMemberResolution.Field)] = new[] { LiteralFieldShape, DecimalConstantShape, EnumFieldShape, StaticFieldShape }, + [nameof(ClrMemberResolution.InconclusiveResult)] = new[] { DeclinedMethodShape, DeclinedValueShape, OppositeHalfShape }, + [nameof(ClrMemberResolution.AbsentResult)] = new[] { GenericMethodShape, NoMemberShape }, + }; + + private const string UncheckedAtAnAttribute = "; at an attribute argument, which the checker does not visit today, it is one more cell of the class the instance-member and method-group cells there hold red, with the same cure"; + private const string NamesAType = "names a type: handed to a slot of another type it is the checker's own mismatch (SPY0220) at every position the checker checks" + UncheckedAtAnAttribute; + private const string NoSuchMember = "no member of the name: the checker refuses the read itself (SPY0203) and binds nothing" + UncheckedAtAnAttribute; + private const string AnInstanceMemberThroughItsType = "the name is on the type's INSTANCE half (`DateTime.year`): the resolver declines to answer, the checker types the read `object` and refuses it under no kind, and the read is SPY0908 CS0120 in a function's body as in a parameter default, a `const` and an attribute argument, so it is a missing kind refusal (#1975's class) and no constant position's verdict. A type that fails to load gets the same answer for every name, and no program names one"; + private const string NoDeclinedValue = "a static field or property whose TYPE has no Sharpy spelling: the census of the `System` namespace finds none (AxisProblems), so no program reads one; when it finds one the shape is owed its kind"; + private const string AGenericMethodThroughItsType = "a generic method, which the resolver does not look at (`Array.resize`): read uncalled its delegate type cannot be inferred, SPY0908 CS8917 in a function's body as in a `const` (#2277's class), so no constant position's verdict"; + + internal static readonly IReadOnlyDictionary ExcludedClrTypeMemberShapes = new Dictionary(StringComparer.Ordinal) + { + [nameof(ClrMemberResolution.NestedType)] = NamesAType, + [NoMemberShape] = NoSuchMember, + [GenericMethodShape] = AGenericMethodThroughItsType, + [OppositeHalfShape] = AnInstanceMemberThroughItsType, + [DeclinedValueShape] = NoDeclinedValue, + }; + + /// The member each probe of an excluded shape reads, which ties to the shape. + internal static readonly IReadOnlyDictionary ExcludedShapeMembers = new Dictionary(StringComparer.Ordinal) + { + [OppositeHalfShape] = (typeof(DateTime), "year"), + [GenericMethodShape] = (typeof(Array), "resize"), + [NoMemberShape] = (typeof(int), "nosuch"), + }; + + /// The shape of read through , as the checker's resolver answers it. + internal static string ClrTypeMemberShape(Type owner, string member) + { + var resolution = new ClrMemberTypeResolver(new ClrTypeBridge()).Resolve(owner, member, ClrReceiverKind.StaticType); + const BindingFlags Statics = BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy; + bool Named(MemberInfo m, ReverseNameContext context) => m.Name == member || NameMangler.ToSharpyName(m.Name, context) == member; + if (resolution is ClrMemberResolution.InconclusiveResult) + { + return owner.GetMethods(Statics).Any(m => !m.IsSpecialName && Named(m, ReverseNameContext.Method)) ? DeclinedMethodShape + : owner.GetProperties(Statics).Cast().Concat(owner.GetFields(Statics)).Any(m => Named(m, ReverseNameContext.Property)) ? DeclinedValueShape + : OppositeHalfShape; + } + if (resolution is ClrMemberResolution.AbsentResult) + return owner.GetMethods(Statics).Any(m => m.IsGenericMethodDefinition && Named(m, ReverseNameContext.Method)) ? GenericMethodShape : NoMemberShape; + if (resolution is not ClrMemberResolution.Field field) + return resolution.GetType().Name; + var info = owner.GetField(field.ClrName, BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy); + return info is { IsLiteral: true } ? owner.IsEnum ? EnumFieldShape : LiteralFieldShape + : info != null && IsDecimalConstant(info) ? DecimalConstantShape + : StaticFieldShape; + } + + /// Whether C# reads a field that is no metadata literal as a constant: a const decimal is compiled to a + /// static readonly field carrying DecimalConstantAttribute, and the C# compiler reads it back as the constant. + internal static bool IsDecimalConstant(FieldInfo field) + => field is { IsStatic: true, IsInitOnly: true } && field.FieldType == typeof(decimal) + && field.CustomAttributes.Any(a => a.AttributeType == typeof(System.Runtime.CompilerServices.DecimalConstantAttribute)); + + /// The kinds that are no member: closed by call 45 (a chain is admitted when each link is). + internal static readonly IReadOnlySet ChainKinds = new HashSet { ScopeConstantKind.ComparisonChain, ScopeConstantKind.ChainWithNonConstantLink }; + + /// A read of a name the program declares: the kind, the spelling of its declaration's type, the spelling of the + /// read, where the reader stands against the member's type (null: outside it; Base: outside, naming the member + /// through a subclass; Self: in the member's own type), the member's order against a bare sibling reader and the + /// outer binding of its name there, its read form where it is a callable, the declarations outside the host, the member's + /// declaration inside it, what follows the host's type, the read, the slot's type, how main shows the value, what the + /// cell prints if it runs, the codes the kind's own refusal carries beside the host's, and the codes of a refusal that is + /// not the host's at all. + internal sealed record OwnRead(BindingKind Kind, ScopeAnnotation? Annotation, Harness.Spelling Spelling, DeclaringRelation? Relation, Harness.Order? Order, BindingKind Outer, + Harness.Form? Form, string? Prelude, string? Member, string? After, string Text, string Type, string Show, string Prints, string[]? Refusals, string[]? Only); + + private const string ACallByShape = "read as a call it is `EmittableConstantKind.Call`, which every table refuses by the expression's shape before a name is resolved (SPY0401 at a default), so no member's kind is asked; at an enum member's value, which no table judges, a call is the 8951 pool's kind:enum-member-constant cell"; + private const string ALocalInAConstantPosition = "a local: only a lambda's default and a local `const` can name one, as a bare name the identifier resolver answers (a local that is no const is SPY0401 at a lambda's default)"; + + /// The kinds with no cell as a name of the program's own, total over with the kinds + /// generates, ModuleEnum (the enum reads) and ImportedName (a referenced module's value + /// named bare). + internal static readonly IReadOnlyDictionary ExcludedOwnReads = new Dictionary + { + [BindingKind.ModuleLet] = ModuleLetRefused, + [BindingKind.ModuleClass] = NamesAType, + [BindingKind.ModuleStruct] = NamesAType, + [BindingKind.ModuleUnion] = NamesAType, + [BindingKind.ModuleInterface] = NamesAType, + [BindingKind.ModuleTypeAlias] = NamesAType, + [BindingKind.NestedType] = NamesAType, + [BindingKind.Constructor] = ACallByShape, + [BindingKind.EnclosingLocal] = ALocalInAConstantPosition, + [BindingKind.Parameter] = ALocalInAConstantPosition, + [BindingKind.Inner] = ALocalInAConstantPosition, + [BindingKind.LocalVar] = ALocalInAConstantPosition, + [BindingKind.LocalLet] = ALocalInAConstantPosition, + [BindingKind.LocalLiteralConst] = ALocalInAConstantPosition, + [BindingKind.LocalComputedConst] = ALocalInAConstantPosition, + [BindingKind.LocalDef] = ALocalInAConstantPosition, + [BindingKind.LambdaTypedLocal] = ALocalInAConstantPosition, + [BindingKind.None] = "no binding", + }; + + /// The read forms with no cell, total over the 8951 pool's Form with the two a cell carries (Value: a + /// callable read uncalled; EnumValue: an enum member's .value). + internal static readonly IReadOnlyDictionary ExcludedConstantForms = new Dictionary + { + [Harness.Form.Call] = ACallByShape, + [Harness.Form.Ctor] = ACallByShape, + }; + + /// The spellings with no cell for a name of the program's own, total over the 8951 pool's Spelling with + /// the spellings derives. + internal static readonly IReadOnlyDictionary ExcludedOwnSpellings = new Dictionary + { + [Harness.Spelling.Call] = ACallByShape, + }; + + private const string NotKeyedByIt = "the reader in a type that is not the member's: every host that is a type's member is one in its outside cells (the attributed class H reads G's member), under each spelling, and no cell is keyed by it"; + private const string ThePoolsRelationCells = "a constant position in a type NESTED in the member's type, or beside it in one enclosing type: bare, the read is refused by D4 (R-KG) whatever the position, and qualified it binds what the outside cell binds. The 8951 pool holds both at an initializer and a method body (its `enclosing` and `sibling` cells); no constant-position host is generated there, by decision (plan-777361's Generator row)"; + + /// The placements of a reader against the member's type with no cell keyed by them, total over + /// DeclaringRelation with Self (the member's own type) and Base (the member named through a subclass). + internal static readonly IReadOnlyDictionary ExcludedOwnPlacements = new Dictionary + { + [DeclaringRelation.Other] = NotKeyedByIt, + [DeclaringRelation.Enclosing] = ThePoolsRelationCells, + [DeclaringRelation.Sibling] = ThePoolsRelationCells, + }; + + private const string NoSelfAtATypeBody = "`self` is bound in a method's body alone: at a type body's own level it names nothing (SPY0200), so a read through it has a host only where the slot sits in a method (a lambda's default, a local or block `const`)"; + + /// + /// Under which spellings, and from where against its type, a name of a kind is read in a constant position (the owner's + /// ruling 12 of 2026-11-20, #2423 comment 7046304965): READ from the typed-read set's readers, which are themselves read + /// from the 8951 pool (), with the reader's position dropped, since a constant position's hosts + /// are this set's own. So the axis is the image of Spelling and of the reader's placement (in the member's own + /// type, or outside it) under that pool's rosters, and a spelling the pool gains for a kind is owed here at every host + /// (). An instance member's read through its type's name stays the kind refusal it is in the + /// pool (H.x, SPY0290): a constructed instance is a call by shape. + /// + internal static IReadOnlyList<(Harness.Spelling Spelling, bool Inside)> OwnSpellings(BindingKind kind) + => TypedReaders.Where(r => r.Kind == kind).Select(r => (r.Spelling, r.Inside)).Distinct().OrderBy(r => r.Spelling).ThenBy(r => r.Inside).ToList(); + + private static string InterfaceStaticIsRefused(string what, string tracker = "#2383") + => $"an interface's `@static` {what} is SPY0908 CS0120 read from a function's body, with no constant position in sight ({tracker}'s class): in the interface's own constant positions a cell would hold that defect and no constant position's verdict. An interface's `const` is generated there"; + + /// The kinds with no cell where the member's own type is an interface (), each + /// with its own probe. + internal static readonly IReadOnlyDictionary InterfaceStatics = new Dictionary + { + [BindingKind.StaticField] = InterfaceStaticIsRefused("field"), + [BindingKind.StaticProperty] = InterfaceStaticIsRefused("property"), + [BindingKind.StaticMethod] = InterfaceStaticIsRefused("method, read uncalled", "#2111"), + }; + + /// Why a host has no cell for a kind in the member's own type, or null when it has one. + internal static string? OwnKindSkips(ConstantHost host, BindingKind kind, bool inside) + => inside && host.Interface ? InterfaceStatics.GetValueOrDefault(kind) : null; + + /// Why a host has no cell for a spelling and placement, or null when it has one. + internal static string? OwnSpellingSkips(ConstantHost host, Harness.Spelling spelling, bool inside) + => !inside ? null + : host.Inside == null ? host.NoInside ?? "the host names no slot in the member's own type, and does not say why" + : spelling == Harness.Spelling.SelfDot && !host.InMethod ? NoSelfAtATypeBody + : null; + + /// The module binding a bare sibling read is set against, by the member's form: a constant where the member is a + /// value, so a read that binds the wrong one is ADMITTED and prints the wrong value, and a function where it is a callable. + internal static BindingKind SiblingOuter(bool callable) => callable ? BindingKind.ModuleDef : BindingKind.ModuleLiteralConst; + + internal const string BareSibling = "bare-sibling"; + internal const string InMethod = "in-method"; + + /// + /// The program's own names as a host's constant position is handed them: every kind of the typed-read set + /// (: each kind with an int-valued declaration of x), under each spelling of its declaration's + /// type, under every spelling and placement derives for the kind, a callable read UNCALLED + /// (called, it is ); the same member named through a subclass; and a builtin function, which is + /// declared by no program. A bare read of a sibling in the member's own type is the class-body rule's (D3), so it is + /// generated at both orders, with and without a module binding of the name: earlier, or with no such binding, it is the + /// member; at-or-after with one it is N2's refusal (SPY0619, which lands with plan-777361's T8); in a method's body the + /// member is not visible bare (N1) and the read is the module's binding, or SPY0200. + /// + internal static IEnumerable OwnReadsOf(ConstantHost host) + { + foreach (var (kind, t) in TypedReads.OrderBy(e => e.Key)) + { + bool callable = t.Member.EndsWith("()", StringComparison.Ordinal); + string name = callable ? t.Member[..^2] : t.Member; + string type = callable ? "() -> int" : "int"; + string show = callable ? "{0}()" : "{0}"; + Harness.Form? form = callable ? Harness.Form.Value : null; + foreach (var annotation in Enum.GetValues()) + { + var declaration = annotation == ScopeAnnotation.Annotated ? t.Annotated : t.Inferred; + if (declaration == null) + continue; + var helpers = t.NeedsFive ? new[] { Five } : Array.Empty(); + string Outside(params string[] lines) => string.Join("\n", helpers.Concat(lines)); + foreach (var (spelling, inside) in OwnSpellings(kind)) + { + if ((OwnSpellingSkips(host, spelling, inside) ?? OwnKindSkips(host, kind, inside)) != null) + continue; + // Through a type's name an instance member is the kind refusal; through `self` it is a value like any other. + var kindRefusal = t.Level == MemberLevel.Instance && spelling != Harness.Spelling.SelfDot ? new[] { "SPY0290" } : null; + if (!inside) + { + string receiver = spelling switch + { + Harness.Spelling.Bare when t.Level == MemberLevel.Module => "", + Harness.Spelling.Qualified when t.Level != MemberLevel.Module => "G.", + Harness.Spelling.Alias when t.Level != MemberLevel.Module => "A.", + _ => throw new ArgumentOutOfRangeException(nameof(host), $"{kind} read {spelling} from outside its type has no receiver here"), + }; + string prelude = t.Level == MemberLevel.Module ? Outside(declaration) + : spelling == Harness.Spelling.Alias ? Outside("class G:\n" + Indent(declaration), "type A = G") + : Outside("class G:\n" + Indent(declaration)); + yield return new OwnRead(kind, annotation, spelling, null, null, BindingKind.None, form, prelude, null, null, receiver + name, type, show, "5", kindRefusal, null); + continue; + } + string member = Indent(declaration) + "\n"; + if (spelling != Harness.Spelling.Bare) + { + string receiver = spelling switch + { + Harness.Spelling.Qualified => "H.", + Harness.Spelling.Alias => "A.", + Harness.Spelling.SelfDot => "self.", + _ => throw new ArgumentOutOfRangeException(nameof(host), $"{kind} read {spelling} in its own type has no receiver here"), + }; + yield return new OwnRead(kind, annotation, spelling, DeclaringRelation.Self, null, BindingKind.None, form, helpers.Length == 0 ? null : Outside(), member, + spelling == Harness.Spelling.Alias ? "type A = H\n" : null, receiver + name, type, show, "5", kindRefusal, null); + continue; + } + foreach (var order in new[] { Harness.Order.Earlier, Harness.Order.Later }) + { + foreach (var outer in new[] { BindingKind.None, SiblingOuter(callable) }) + { + string? prelude = outer == BindingKind.None ? (helpers.Length == 0 ? null : Outside()) + : Outside(callable ? "def x() -> int:\n return 12" : "const x: int = 12"); + // In a method's body the member is not visible bare; at the type body's level it is, unless N2 refuses. + string[]? only = host.InMethod ? outer == BindingKind.None ? new[] { "SPY0200" } : null + : order == Harness.Order.Later && outer != BindingKind.None ? new[] { "SPY0619" } : null; + yield return new OwnRead(kind, annotation, spelling, DeclaringRelation.Self, order, outer, form, prelude, member, null, name, type, show, + host.InMethod && outer != BindingKind.None ? "12" : "5", null, only); + } + } + } + if (t.Level != MemberLevel.Module) + { + yield return new OwnRead(kind, annotation, Harness.Spelling.Qualified, DeclaringRelation.Base, null, BindingKind.None, form, + Outside("class G:\n" + Indent(declaration), "class D(G):\n pass"), null, null, "D." + name, type, show, "5", + t.Level == MemberLevel.Instance ? new[] { "SPY0290" } : null, null); + } + } + } + yield return new OwnRead(BindingKind.Builtin, null, Harness.Spelling.Bare, null, null, BindingKind.None, Harness.Form.Value, null, null, null, "abs", "(int) -> int", "{0}(-5)", "5", null, null); + } + + // ------------------------------------------------------------------------------------------- // + // lambda-default: owner × kind × annotation × position × order × outer + // ------------------------------------------------------------------------------------------- // + + /// An owner of a parameter default: whether it is a lambda and which spelling (LambdaExpression.IsArrowSyntax; + /// null for the def), and the expression that stands at the position, {d} the default. A def IS its + /// position (), so its text is the default alone. + internal sealed record DefaultOwner(bool? Arrow, string Text); + + /// The owners, total over ; the lambdas are total over IsArrowSyntax, and + /// reads the flag back from each cell's parsed source. + internal static readonly IReadOnlyDictionary DefaultOwners = new Dictionary + { + [ScopeDefaultOwner.Def] = new(null, "{d}"), + [ScopeDefaultOwner.Lambda] = new(false, "(lambda p1: int = {d}: p1)()"), + [ScopeDefaultOwner.ArrowLambda] = new(true, "((p1: int = {d}) -> p1)()"), + }; + + private const string AStoredLambdaLosesItsDefault = "stored in a field and called later (`g: auto = lambda p1: int = 5: p1`, then `H.g()`), a lambda has lost its default: the field's type is a function type, which carries none, and the call is SPY0908 CS7036 with a LITERAL default, so no cell could show what the default read"; + + /// How the lambda of a cell is used, closed: called where it stands, or stored and called later. The cell prints the + /// default's value, which only the first shows today. + internal static readonly IReadOnlyDictionary ExcludedLambdaUses = new Dictionary(StringComparer.Ordinal) + { + ["stored"] = AStoredLambdaLosesItsDefault, + }; + + /// The kinds a default reads by a bare name from its own class: READ from the typed-read set's readers, as the kinds + /// the P77a pool runs from a def's default there. A lambda's default is a constant position like a def's, so a + /// kind that is no constant has no cell that must run (its verdict there is the constant-kind set's). + internal static IReadOnlyList LambdaDefaultKinds + => TypedReaders.Where(r => r is { Spelling: Harness.Spelling.Bare, Inside: true, Position: ReadPosition.ParameterDefault }).Select(r => r.Kind).Distinct().ToList(); + + private const string ACallInAConstantOnlyPosition = "takes a compile-time constant, and a lambda called where it stands is a call: refused by its shape (SPY0401) before any name in it is read"; + + private static string ALambdaDefaultInAPropertyDefault(bool isStatic) + => $"in {(isStatic ? "a `@static`" : "an instance")} property's default, a lambda that gives a parameter a default is SPY0908 CS0103 with a LITERAL default (the emitted `__lambda_0` is declared nowhere): no cell there could run, whatever its default reads, and the defect is no name's verdict"; + + /// The positions of 's source that hold no lambda, each reason with its probe. + internal static readonly IReadOnlyDictionary ExcludedLambdaDefaultPositions = new Dictionary + { + [ReadPosition.ParameterDefault] = ACallInAConstantOnlyPosition, + [ReadPosition.DataclassFieldInitializer] = ACallInAConstantOnlyPosition, + [ReadPosition.StructFieldInitializer] = ACallInAConstantOnlyPosition, + [ReadPosition.StaticPropertyDefault] = ALambdaDefaultInAPropertyDefault(true), + [ReadPosition.InstancePropertyDefault] = ALambdaDefaultInAPropertyDefault(false), + }; + + /// The mark of a control cell: the owner's slot at a position with a literal default. + internal const string LiteralDefault = "literal-default"; + + /// The positions of a kind's bare read from its own type with nothing between the read and the type body, as the + /// P77a pool has them (): the class-level positions, since a bare read of a member runs nowhere else (N1). + internal static IEnumerable BareReadPositions(BindingKind kind) + => TypedReaders.Where(r => r.Kind == kind && r is { Spelling: Harness.Spelling.Bare, Inside: true, Nesting: Harness.Nesting.Direct }).Select(r => r.Position).Distinct().OrderBy(p => p); + + /// Where a lambda whose default reads a member of the kind stands: every class-level initializer the kind is read + /// from bare, so the axis is the image of under the pool's own rosters. + internal static IEnumerable LambdaDefaultPositions(BindingKind kind) + => BareReadPositions(kind).Where(p => !ExcludedLambdaDefaultPositions.ContainsKey(p)); + + /// The lambdas of a source that give a parameter a default, by the compiler's own parser: each one's IsArrowSyntax. + internal static List LambdasWithADefault(string source) + { + static IEnumerable Descendants(Sharpy.Compiler.Parser.Ast.Node node) => node.GetChildNodes().SelectMany(Descendants).Prepend(node); + var module = new Sharpy.Compiler.Parser.Parser(new Sharpy.Compiler.Lexer.Lexer(source).TokenizeAll()).ParseModule(); + return Descendants(module).OfType().Where(l => l.Parameters.Any(p => p.DefaultValue != null)).Select(l => l.IsArrowSyntax).ToList(); + } + + // ------------------------------------------------------------------------------------------- // + // alias-target: site × shape × target × use × order + // ------------------------------------------------------------------------------------------- // + + /// A site an alias is declared at: the program around {alias} and {use}, the declaration that names the + /// alias {K} there, and what stands in its place when nothing does. + internal sealed record AliasSite(string Label, string Program, string Use, string NoUse); + + /// The sites, total over ScopeKind with : the scope the alias's binder declares + /// it into (ResolveTypeAliasDeclaration at module level and in a type body, RegisterScopedTypeAlias in a type + /// body, a function and a block). A type body is refined by . + internal static readonly IReadOnlyDictionary AliasSites = new Dictionary + { + [ScopeKind.Module] = new[] { new AliasSite("module", "{alias}\n{use}", "def f(k: {K}) -> int:\n return 1", "def f(k: int) -> int:\n return 1") }, + [ScopeKind.TypeBody] = Array.Empty(), + [ScopeKind.FunctionLike] = new[] + { + new AliasSite("function", "def g() -> int:\n {alias}\n{use}\n return 1", " def f(k: {K}) -> int:\n return 1", " def f(k: int) -> int:\n return 1"), + new AliasSite("method", "class H:\n def g(self) -> int:\n {alias}\n{use}\n return 1", " def f(k: {K}) -> int:\n return 1", " def f(k: int) -> int:\n return 1"), + }, + [ScopeKind.Block] = new[] + { + new AliasSite("block", "def g() -> int:\n if True:\n {alias}\n{use}\n return 1", " def f(k: {K}) -> int:\n return 1", " def f(k: int) -> int:\n return 1"), + }, + }; + + internal static readonly IReadOnlyDictionary ExcludedAliasScopes = new Dictionary + { + [ScopeKind.InitializerHost] = NotADeclarationScope, + [ScopeKind.Transparent] = HoldsTypeParameters, + }; + + /// The type bodies an alias is declared in, total over TypeKind with . + internal static readonly IReadOnlyDictionary AliasTypeHosts = new Dictionary + { + [TypeKind.Class] = new[] { new AliasSite("class", "class H:\n {alias}\n{use}", " def f(self, k: {K}) -> int:\n return 1", " def f(self, k: int) -> int:\n return 1") }, + [TypeKind.Struct] = new[] { new AliasSite("struct", "struct H:\n {alias}\n v: int = 1\n{use}", " def f(self, k: {K}) -> int:\n return 1", " def f(self, k: int) -> int:\n return 1") }, + [TypeKind.Interface] = new[] { new AliasSite("interface", "interface H:\n {alias}\n{use}", " def f(self, k: {K}) -> int: ...", " def f(self, k: int) -> int: ...") }, + }; + + internal static readonly IReadOnlyDictionary ExcludedAliasTypeHosts = new Dictionary + { + [TypeKind.Enum] = EnumBodyHoldsCases, + [TypeKind.Union] = UnionBodyHoldsCases, + [TypeKind.Delegate] = DelegateHasNoBody, + }; + + /// A target's shape: where in it the type's name {N} sits, whether the alias is generic, what it imports, and the + /// name of a type that exists there (C0, the program's own class, unless the shape qualifies the name). + internal sealed record AliasShape(string Label, string Target, bool Generic = false, string? Import = null, string Declared = "C0"); + + private static readonly AliasShape NameShape = new("name", "{N}"); + + /// The shapes, total over the public properties the alias's three AST records declare + /// (TypeAlias, TypeAnnotation, FunctionType) with : each property + /// that can hold, wrap or qualify a type's name is a shape, keyed Record.Property. + internal static readonly IReadOnlyDictionary AliasShapes = new Dictionary(StringComparer.Ordinal) + { + [$"TypeAlias.{nameof(AstTypeAlias.Type)}"] = NameShape, + [$"TypeAlias.{nameof(AstTypeAlias.TypeParameters)}"] = new("generic-alias", "list[{N}]", Generic: true), + [$"TypeAnnotation.{nameof(AstTypeAnnotation.Name)}"] = NameShape, + [$"TypeAnnotation.{nameof(AstTypeAnnotation.NameParts)}"] = new("dotted", "pathlib.{N}", Import: "pathlib", Declared: "Path"), + [$"TypeAnnotation.{nameof(AstTypeAnnotation.TypeArguments)}"] = new("type-argument", "list[{N}]"), + [$"TypeAnnotation.{nameof(AstTypeAnnotation.IsOptional)}"] = new("optional", "{N}?"), + [$"TypeAnnotation.{nameof(AstTypeAnnotation.IsCSharpNullable)}"] = new("nullable", "{N} | None"), + [$"TypeAnnotation.{nameof(AstTypeAnnotation.ErrorType)}"] = new("result-error", "int !{N}"), + [$"TypeAnnotation.{nameof(AstTypeAnnotation.TupleElementNames)}"] = new("tuple-element", "tuple[a: {N}, b: int]"), + [$"FunctionType.{nameof(AstFunctionType.ParameterTypes)}"] = new("callable-parameter", "({N}) -> int"), + [$"FunctionType.{nameof(AstFunctionType.ReturnType)}"] = new("callable-return", "() -> {N}"), + }; + + private const string TheAliasItself = "the alias's own name and where it stands: not its target"; + private const string AnEscapedNameIsMissingAsItsPlainOne = "the escape picks the namespace a spelling is looked up in (a type of the program over a builtin of the same spelling): a missing name is missing in both, so an escaped target has its plain one's verdict (named by an annotation, ``type K0 = `nosuch` `` is SPY0202 as `type K0 = nosuch` is)"; + private const string SourceLocation = "a source location"; + private const string UnparserFact = "a syntax fact for the unparser and the structural comparer (the record's own remark): resolution does not read it"; + + internal static readonly IReadOnlyDictionary ExcludedAliasShapeProperties = new Dictionary(StringComparer.Ordinal) + { + [$"TypeAlias.{nameof(AstTypeAlias.Name)}"] = TheAliasItself, + [$"TypeAlias.{nameof(AstTypeAlias.NameLineStart)}"] = TheAliasItself, + [$"TypeAlias.{nameof(AstTypeAlias.NameColumnStart)}"] = TheAliasItself, + [$"TypeAlias.{nameof(AstTypeAlias.NameColumnEnd)}"] = TheAliasItself, + [$"TypeAlias.{nameof(AstTypeAlias.IsNameBacktickEscaped)}"] = TheAliasItself, + [$"TypeAlias.{nameof(AstTypeAlias.FunctionType)}"] = "refined by FunctionType's own properties", + [$"TypeAnnotation.{nameof(AstTypeAnnotation.IsNameBacktickEscaped)}"] = AnEscapedNameIsMissingAsItsPlainOne, + [$"TypeAnnotation.{nameof(AstTypeAnnotation.BacktickEscapedParts)}"] = UnparserFact, + [$"TypeAnnotation.{nameof(AstTypeAnnotation.IsResult)}"] = "computed from ErrorType, which is a shape", + [$"TypeAnnotation.{nameof(AstTypeAnnotation.TupleElementNamesBacktickEscaped)}"] = UnparserFact, + [$"FunctionType.{nameof(AstFunctionType.LineStart)}"] = SourceLocation, + [$"FunctionType.{nameof(AstFunctionType.ColumnStart)}"] = SourceLocation, + [$"FunctionType.{nameof(AstFunctionType.LineEnd)}"] = SourceLocation, + [$"FunctionType.{nameof(AstFunctionType.ColumnEnd)}"] = SourceLocation, + [$"FunctionType.{nameof(AstFunctionType.Span)}"] = SourceLocation, + }; + + private static IEnumerable DeclaredProperties(Type record) + => record.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly).Select(p => $"{record.Name}.{p.Name}"); + + // ------------------------------------------------------------------------------------------- // + // The axes against their enumerations + // ------------------------------------------------------------------------------------------- // + + /// Each axis against its enumeration: a value is generated or carries its reason, never both, never neither; a + /// generated value has a cell; and an axis read from the pool or a census is the image it says it is. + internal static List AxisProblems(IReadOnlyList pool) + { + var problems = new List(); + + void Partition(string axis, IEnumerable universe, IEnumerable generated, IEnumerable excluded) where T : notnull + { + var g = generated.ToHashSet(); + var e = excluded.ToHashSet(); + var u = universe.ToHashSet(); + foreach (var value in u.OrderBy(v => v.ToString(), StringComparer.Ordinal)) + { + if (g.Contains(value) == e.Contains(value)) + problems.Add($"{axis}: {value} is {(g.Contains(value) ? "generated and excluded" : "neither generated nor excluded")}"); + } + foreach (var value in g.Concat(e).Where(v => !u.Contains(v)).Distinct()) + problems.Add($"{axis}: {value} is no value of the enumeration"); + } + + IEnumerable Route(string route) => pool.Where(c => c.Cell.Key!.Route == route); + + void Carried(string route, IEnumerable owed, Func> read) where T : notnull + { + var carried = Route(route).SelectMany(read).ToHashSet(); + foreach (var value in owed.Where(v => !carried.Contains(v))) + problems.Add($"{route}: no cell carries {value}"); + } + + IEnumerable Part(Case c) where T : struct, Enum => c.Cell.Key!.Part() is { } v ? new[] { v } : Array.Empty(); + IEnumerable Marks(Case c) => c.Cell.Key!.Marks; + + // no-initializer + Partition("no-initializer × kind", Enum.GetValues(), Declarations.Keys, ExcludedDeclarations.Keys); + Partition("no-initializer × host", Enum.GetValues(), DeclarationHosts.Keys, ExcludedDeclarationHosts.Keys); + Partition("no-initializer × declared type", typeof(SemanticType).Assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(SemanticType)) && !t.IsAbstract), + ValueTypes.Keys, ExcludedValueTypes.Keys); + Carried("no-initializer", Declarations.Keys, c => new[] { c.Cell.Target }); + Carried("no-initializer", Enum.GetValues(), Part); + // The host is read from its typed part and the declared type from its label: two axes, so a pool that loses every cell of + // one host, or of one declared type, is red. Then the product: every kind a type declares, in every host, with every type. + Carried("no-initializer", DeclarationHosts.Values.SelectMany(h => h), c => HostOf(c.Cell) is { } host ? new[] { host } : Array.Empty()); + var typeLabels = ValueTypes.Values.SelectMany(v => v).Select(v => v.Label).ToList(); + Carried("no-initializer", typeLabels, Marks); + foreach (var misplaced in DeclarationHosts.Where(h => h.Value.Any(host => host.Kind != h.Key)).Select(h => h.Key)) + problems.Add($"no-initializer × host: a host listed under {misplaced} carries another kind"); + var declared = Route("no-initializer").Select(c => (c.Cell.Target, Host: HostOf(c.Cell), Marks: Marks(c).ToHashSet(StringComparer.Ordinal))).ToList(); + foreach (var kind in Declarations.Where(d => d.Value.InType).Select(d => d.Key)) + { + foreach (var host in DeclarationHosts.Values.SelectMany(h => h)) + { + foreach (var label in typeLabels.Where(l => !declared.Any(d => d.Target == kind && d.Host == host && d.Marks.Contains(l)))) + problems.Add($"no-initializer: no cell declares {kind} of type {label} in a {host}"); + } + } + + // typed-read + Partition("typed-read × kind", Enum.GetValues(), TypedReads.Keys, ExcludedTypedReads.Keys); + Partition("typed-read × spelling", Enum.GetValues(), Route("typed-read").SelectMany(Part), ExcludedTypedSpellings.Keys); + Partition("typed-read × reader position", Enum.GetValues(), Route("typed-read").Select(c => c.Cell.Position!.Value), ExcludedTypedPositions.Keys); + Carried("typed-read", TypedReads.Keys, c => new[] { c.Cell.Target }); + Carried("typed-read", Enum.GetValues(), Part); + foreach (var unplaced in UnplacedTypedReaders.Take(10)) + problems.Add($"typed-read: the 8951 pool spells a read this set has no reader host for: {unplaced}"); + foreach (var placement in TypedThirdPlacements.Keys.Where(p => !ExcludedTypedPlacements.ContainsKey(p))) + problems.Add($"typed-read × reader placement: {placement} is neither generated nor excluded, and the 8951 pool spells {TypedThirdPlacements[placement]} must-run reads from it"); + // The other direction: an exclusion says the pool reads from the placement, so one the pool no longer spells holds nothing. + foreach (var stale in ExcludedTypedPlacements.Keys.Where(p => !TypedThirdPlacements.ContainsKey(p))) + problems.Add($"typed-read × reader placement: {stale} is excluded as a placement the 8951 pool reads from, and that pool spells no must-run read from it"); + foreach (var label in TypedLabelledReads.Keys.Where(l => !ExcludedTypedReceivers.ContainsKey(l))) + problems.Add($"typed-read × receiver: the label '{label}' is neither generated nor excluded, and the 8951 pool spells {TypedLabelledReads[label]} must-run reads under it"); + foreach (var stale in ExcludedTypedReceivers.Keys.Where(l => !TypedLabelledReads.ContainsKey(l))) + problems.Add($"typed-read × receiver: the label '{stale}' is excluded as one the 8951 pool reads under, and that pool spells no must-run read under it"); + foreach (var (route, excluded) in ExcludedOrders) + Partition($"{route} × order", Enum.GetValues(), Route(route).SelectMany(Part), excluded.Keys); + foreach (var later in Route("typed-read").Where(c => c.Cell.Key!.Part() == Harness.Order.Later)) + { + if (!pool.Any(c => c.Cell.Id == EarlierTwinId(later.Cell))) + problems.Add($"typed-read: {later.Cell.Id} has no twin at the earlier order, which is what says whether its red is the order's"); + } + + // callee + Partition("callee × binder", Enum.GetValues(), CalleeBinders.Keys, ExcludedCalleeBinders.Keys); + Partition("callee × outer", Enum.GetValues(), CalleeOuters.Keys, ExcludedCalleeOuters.Keys); + Carried("callee", CalleeBinders.Keys, c => c.Cell.Construct is { } t ? new[] { t } : Array.Empty()); + Carried("callee", CalleeOuters.Keys, c => new[] { c.Cell.Outer }); + Carried("callee", new[] { BindingKind.Parameter }, c => new[] { c.Cell.Target }); + + // constant-kind: the readers, their hosts and their tables + var readers = ClassifierReaders.Value; + problems.AddRange(readers.Problems.Select(p => $"constant-kind × reader: {p}")); + Partition("constant-kind × reader", readers.Sites.Keys, ConstantReaders.Keys, ExcludedConstantReaders.Keys); + foreach (var hostless in ConstantReaders.Where(r => r.Value.Length == 0)) + problems.Add($"constant-kind × reader: {hostless.Key} has no host"); + var tables = ConstantReaders.Keys.Where(readers.Sites.ContainsKey).Select(k => readers.Sites[k]).Distinct().ToList(); + Partition("constant-kind × table", Enum.GetValues(), tables, ExcludedAdmissionTables.Keys); + Partition("constant-kind × const site", Enum.GetValues(), ConstSites.Keys, ExcludedConstScopes.Keys); + Partition("constant-kind × const type body", Enum.GetValues(), ConstTypeHosts.Keys, ExcludedConstTypeHosts.Keys); + foreach (var empty in ConstSites.Where(e => e.Key != ScopeKind.TypeBody && e.Value.Length == 0).Select(e => e.Key.ToString()) + .Concat(ConstTypeHosts.Where(e => e.Value.Length == 0).Select(e => e.Key.ToString()))) + problems.Add($"constant-kind × const site: {empty} is listed with no host"); + var hostLabels = AllConstantHosts().Select(h => h.Host.Label).ToList(); + foreach (var twice in hostLabels.GroupBy(l => l, StringComparer.Ordinal).Where(g => g.Count() > 1)) + problems.Add($"constant-kind × host: {twice.Key} is the label of {twice.Count()} hosts"); + Carried("constant-kind", tables, Part); + Carried("constant-kind", hostLabels, Marks); + Carried("constant-kind", Enum.GetValues(), Part); + + // constant-kind: the member kinds, each against what the compiler records for the member + var census = StdlibModuleMembers.Value; + Partition("constant-kind × module member collection", typeof(ModuleOverloads).GetProperties(BindingFlags.Public | BindingFlags.Instance).Select(p => p.Name), + ModuleMemberShapes.Keys.Concat(ExcludedModuleMemberShapes.Keys).Select(k => k.Split('/')[0]).Distinct(), ExcludedModuleCollections.Keys); + Partition("constant-kind × module member", census.Values.Distinct().Concat(UnproducedModuleMemberShapes), ModuleMemberShapes.Keys, ExcludedModuleMemberShapes.Keys); + foreach (var shape in UnproducedModuleMemberShapes.Where(s => census.Values.Contains(s))) + problems.Add($"constant-kind × module member: {census.First(v => v.Value == shape).Key} is {shape}, which is listed as a shape no member has"); + foreach (var kind in ModuleMemberShapes.Values.Where(k => !ModuleMembers.ContainsKey(k))) + problems.Add($"constant-kind × module member: {kind} has no member to read"); + foreach (var kind in ClrTypeMemberShapes.Values.Where(k => !TypeMembers.ContainsKey(k))) + problems.Add($"constant-kind × type member: {kind} has no member to read"); + Partition("constant-kind × type member", + typeof(ClrMemberResolution).GetNestedTypes(BindingFlags.Public | BindingFlags.NonPublic).Where(t => t.IsSubclassOf(typeof(ClrMemberResolution))) + .SelectMany(t => RefinedClrTypeMemberShapes.GetValueOrDefault(t.Name, new[] { t.Name })), + ClrTypeMemberShapes.Keys, ExcludedClrTypeMemberShapes.Keys); + Partition("constant-kind × enum access", Enum.GetValues(), EnumReadKinds.Values.Where(v => v.Access != null).Select(v => v.Access!.Value), Array.Empty()); + foreach (var intShape in new[] { true, false }.Where(isInt => !EnumReadKinds.Values.Contains((isInt, (EnumMemberAccessKind?)null)))) + problems.Add($"constant-kind × enum access: the member of {(intShape ? "an int" : "a string")} enum has no kind"); + Partition("constant-kind × kind", Enum.GetValues(), + ModuleMemberShapes.Values.Concat(ClrTypeMemberShapes.Values).Concat(EnumReadKinds.Keys).Append(ScopeConstantKind.OwnMember), ChainKinds); + var ownKinds = TypedReads.Keys.Append(BindingKind.Builtin).Append(BindingKind.ModuleEnum).Append(BindingKind.ImportedName).Distinct().ToList(); + Partition("constant-kind × own name", Enum.GetValues(), ownKinds, ExcludedOwnReads.Keys); + Carried("constant-kind", ownKinds, c => new[] { c.Cell.Target }); + Carried("constant-kind", Enum.GetValues(), Part); + Partition("constant-kind × read form", Enum.GetValues(), Route("constant-kind").SelectMany(Part), ExcludedConstantForms.Keys); + + // constant-kind: the spelling of the read and the placement of its reader, per where the member lives + var constantCells = Route("constant-kind").ToList(); + IEnumerable Own() => constantCells.Where(c => c.Cell.Key!.Part() == ScopeConstantKind.OwnMember); + Partition("constant-kind × own spelling", Enum.GetValues(), Own().SelectMany(Part), ExcludedOwnSpellings.Keys); + Partition("constant-kind × own placement", Enum.GetValues(), Own().SelectMany(Part), ExcludedOwnPlacements.Keys); + foreach (var (_, host) in AllConstantHosts()) + { + if ((host.Inside == null) == (host.NoInside == null)) + problems.Add($"constant-kind × host: {host.Label} {(host.Inside == null ? "has no slot in the member's own type and no reason" : "has such a slot and a reason against it")}"); + if (host.InMethod && host.Inside == null) + problems.Add($"constant-kind × host: {host.Label} says its slot sits in a method and names none"); + // Every spelling and placement the typed-read set has a reader for, of every kind: a cell at this host, or the reason there is none. + foreach (var (kind, t) in TypedReads) + { + string slot = t.Member.EndsWith("()", StringComparison.Ordinal) ? "() -> int" : "int"; + foreach (var (spelling, inside) in OwnSpellings(kind)) + { + bool carried = Own().Any(c => c.Cell.Target == kind && Marks(c).Contains(host.Label) && c.Cell.Key!.Part() == spelling + && (c.Cell.Key.Part() == DeclaringRelation.Self) == inside); + bool skipped = (OwnSpellingSkips(host, spelling, inside) ?? OwnKindSkips(host, kind, inside) ?? HostSkips(host, slot)) != null; + if (carried == skipped) + problems.Add($"constant-kind × own spelling: {kind} read {spelling} {(inside ? "in its own type" : "from outside its type")} at {host.Label} is {(carried ? "generated and excluded" : "neither generated nor excluded")}"); + } + } + } + foreach (var kind in TypedReads.Keys.Where(k => OwnSpellings(k).Count == 0)) + problems.Add($"constant-kind × own spelling: the typed-read set has no reader of {kind}, so no spelling is owed for it"); + // A bare sibling read has the class-body rule's two axes: both orders, with and without a module binding of the name. + foreach (var sibling in Own().Where(c => Marks(c).Contains(BareSibling)).GroupBy(c => string.Join("/", c.Cell.Key!.Parts.Where(p => p is not Harness.Order && !(p is string text && text.StartsWith("outer=", StringComparison.Ordinal)))))) + { + var seen = sibling.Select(c => (c.Cell.Key!.Part(), c.Cell.Outer != BindingKind.None)).ToHashSet(); + foreach (var order in new Harness.Order?[] { Harness.Order.Earlier, Harness.Order.Later }) + { + foreach (var bound in new[] { false, true }.Where(b => !seen.Contains((order, b)))) + problems.Add($"constant-kind × sibling: {sibling.Key} has no cell at {order} {(bound ? "under" : "without")} a module binding of the name"); + } + } + Partition("constant-kind × import form", Enum.GetValues(), ImportSpellings.Select(i => i.Form), Array.Empty()); + Partition("constant-kind × import kind", Enum.GetValues(), ImportSpellings.Select(i => i.Kind), ExcludedImportKinds.Keys); + Partition("constant-kind × star import", new[] { false, true }, ImportSpellings.Where(i => i.Form == ImportBindingForm.FromImport).Select(i => i.Star), Array.Empty()); + Partition("constant-kind × enum spelling", Enum.GetValues(), EnumSpellings.Keys, ExcludedEnumSpellings.Keys); + // Every member is read under every spelling it has: a spelling with no cell for one member is a hand list again. + IEnumerable Owed(ScopeConstantKind kind) + => ModuleMembers.ContainsKey(kind) ? ImportSpellings.Select(i => i.Label) + : TypeMembers.ContainsKey(kind) ? ImportSpellings.Select(i => i.Label).Append(TypeAliasSpelling) + : EnumReadKinds.ContainsKey(kind) ? EnumSpellings.Where(v => EnumReadSkips(v.Key, kind) == null).Select(v => v.Value.Label) + : Array.Empty(); + foreach (var kind in EnumReadKinds.Keys) + { + foreach (var (spelling, named) in EnumSpellings.Where(s => EnumReadSkips(s.Key, kind) != null)) + { + if (constantCells.Any(c => c.Cell.Key!.Part() == kind && Marks(c).Contains(named.Label))) + problems.Add($"constant-kind × enum spelling: {kind} under {spelling} is generated and excluded"); + } + } + // A type the primitive catalog names is read by that name too: per member, the spelling or the reason the name is no receiver. + bool ReadByItsBuiltinName(Type? owner) => owner != null && PrimitiveCatalog.GetByClrType(owner) != null && !ExcludedBuiltinReceivers.ContainsKey(owner); + var typeMembers = TypeMembers.Values.SelectMany(v => v).ToList(); + Partition("constant-kind × builtin name", typeMembers.Where(m => PrimitiveCatalog.GetByClrType(m.Owner) != null).Select(m => $"{m.TypeName}.{m.Member}"), + typeMembers.Where(m => m.BuiltinName != null).Select(m => $"{m.TypeName}.{m.Member}"), typeMembers.Where(m => ExcludedBuiltinReceivers.ContainsKey(m.Owner)).Select(m => $"{m.TypeName}.{m.Member}")); + foreach (var m in typeMembers.Where(m => m.BuiltinName != null && PrimitiveCatalog.GetByName(m.BuiltinName)?.ClrType != m.Owner)) + problems.Add($"constant-kind × builtin name: `{m.BuiltinName}` is no name the primitive catalog gives {m.Owner.Name}, which {m.TypeName}.{m.Member} is read through"); + foreach (var (kind, expressions) in ConstantExpressions) + { + foreach (var member in expressions.GroupBy(e => e.Label, StringComparer.Ordinal)) + { + var owed = ReadByItsBuiltinName(member.First().Owner) ? Owed(kind).Append(BuiltinNameSpelling) : Owed(kind); + foreach (var spelling in owed.Where(o => !constantCells.Any(c => c.Cell.Key!.Part() == kind && Marks(c).Contains(member.Key) && Marks(c).Contains(o)))) + problems.Add($"constant-kind × spelling: no cell reads {kind} {member.Key} under {spelling}"); + } + } + // And at every host: a cell, or the reason the host's slot cannot take the expression's type. + var marked = constantCells.Select(c => (Kind: c.Cell.Key!.Part(), Marks: Marks(c).ToHashSet(StringComparer.Ordinal))).ToList(); + foreach (var (_, host) in AllConstantHosts()) + { + foreach (var (kind, expressions) in ConstantExpressions) + { + foreach (var e in expressions) + { + bool carried = marked.Any(m => m.Kind == kind && m.Marks.Contains(host.Label) && m.Marks.Contains(e.Label) && (e.Spelling == null || m.Marks.Contains(e.Spelling))); + if (carried == (HostSkips(host, e.Type) != null)) + problems.Add($"constant-kind × host: {kind} {e.Label}{(e.Spelling == null ? "" : " under " + e.Spelling)} at {host.Label} is {(carried ? "generated and excluded" : "neither generated nor excluded")}"); + } + } + } + if (!constantCells.Any(c => Marks(c).Contains(BuiltinNameSpelling))) + problems.Add($"constant-kind × spelling: no cell reads a referenced type by its builtin name"); + foreach (var (shape, (owner, member)) in ExcludedShapeMembers) + { + if (ClrTypeMemberShape(owner, member) is var answered && answered != shape) + problems.Add($"constant-kind × type member: `{owner.Name}.{member}` is what the exclusion of {shape} reads, and the checker's resolver answers {answered} for it"); + if (!ExcludedClrTypeMemberShapes.TryGetValue(shape, out var reason) || !BehaviourProbes.ContainsKey(reason)) + problems.Add($"constant-kind × type member: {shape} names a member and has no probed exclusion"); + } + // A shape excluded because no member has it: the census of the namespace every program reads its types from holds it at 0. + var censused = new HashSet(StringComparer.Ordinal); + foreach (var type in typeof(object).Assembly.GetExportedTypes().Where(t => t.Namespace == nameof(System) && !t.IsGenericTypeDefinition && !t.IsNested)) + { + foreach (var value in type.GetProperties(BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly).Select(m => NameMangler.ToSharpyName(m.Name, ReverseNameContext.Property)) + .Concat(type.GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly).Select(m => NameMangler.ToSharpyName(m.Name, ReverseNameContext.Property))).Distinct()) + { + string shape = ClrTypeMemberShape(type, value); + censused.Add(shape); + if (shape == DeclinedValueShape) + problems.Add($"constant-kind × type member: `{type.Name}.{value}` is {DeclinedValueShape}, which is excluded as a shape no member has"); + } + } + // The census's own control: it sees the static values the generated kinds are the image of, so its 0 is a count. + foreach (var unseen in new[] { LiteralFieldShape, DecimalConstantShape, EnumFieldShape, StaticFieldShape, nameof(ClrMemberResolution.Property) }.Where(v => !censused.Contains(v))) + problems.Add($"constant-kind × type member: the census of `System` sees no static value of shape {unseen}, so it says nothing of the shape it holds at 0"); + // A referenced MODULE's field is a constant by discovery's `IsConst`, which is `FieldInfo.IsLiteral` alone: a `const decimal` + // there would be C#'s constant and discovery's static. No module declares one today (the census above is this scan's control: + // it finds `Decimal`'s); when one does, the shape is owed its kind (ruling 17). + foreach (var field in new[] { SharpyStdlibReference.Assembly, Sharpy.TestInfrastructure.SharpyCoreReference.Assembly }.SelectMany(a => a.GetExportedTypes()) + .SelectMany(t => t.GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly)).Where(IsDecimalConstant)) + problems.Add($"constant-kind × module member: `{field.DeclaringType!.Name}.{field.Name}` is a `const decimal` of a referenced assembly's own type, which discovery records as no constant: the shape is owed its kind"); + foreach (var (kind, expressions) in ConstantExpressions) + { + foreach (var e in expressions) + { + if (e.ModuleValue != null) + { + if (!census.TryGetValue(e.ModuleValue, out var recorded)) + problems.Add($"constant-kind: discovery records no member {e.ModuleValue}"); + else if (!ModuleMemberShapes.TryGetValue(recorded, out var image) || image != kind) + problems.Add($"constant-kind: {e.Label} is listed under {kind}, and discovery records {e.ModuleValue} as {recorded}"); + } + else if (e.Owner != null) + { + var shape = ClrTypeMemberShape(e.Owner, e.Member!); + if (!ClrTypeMemberShapes.TryGetValue(shape, out var image) || image != kind) + problems.Add($"constant-kind: {e.Label} is listed under {kind}, and the checker's resolver answers {shape} for {e.Owner.Name}.{e.Member}"); + } + else if (EnumReadKinds.TryGetValue(kind, out var read)) + { + string suffix = read.Access switch + { + null => ".RED", + EnumMemberAccessKind.IntValue or EnumMemberAccessKind.StringValue => ".RED.value", + _ => ".RED.name", + }; + // The enum's declaration opens the prelude; a spelling may declare an alias of it after. + if (e.Prelude?.Split("\ntype ", 2)[0] != (read.IntShape ? IntEnum : StringEnum) || !e.Text.EndsWith(suffix, StringComparison.Ordinal)) + problems.Add($"constant-kind: {e.Text} is listed under {kind}, which is `{suffix}` of {(read.IntShape ? "an int" : "a string")} enum"); + } + else if (!ChainKinds.Contains(kind) || e.Import != null || e.Prelude != null) + problems.Add($"constant-kind: {e.Label} is listed under {kind} and names no member the kind can be checked against"); + } + } + foreach (var kind in Enum.GetValues().Where(k => k != ScopeConstantKind.OwnMember && !ConstantExpressions.ContainsKey(k))) + problems.Add($"constant-kind: {kind} has no expression"); + + // init-overload + Carried("init-overload", Enum.GetValues(), Part); + + // lambda-default + var lambdaDefaults = Route("lambda-default").ToList(); + Carried("lambda-default", Enum.GetValues(), Part); + Partition("lambda-default × owner", Enum.GetValues(), DefaultOwners.Keys, Array.Empty()); + Partition("lambda-default × lambda spelling", new[] { false, true }, DefaultOwners.Values.Where(o => o.Arrow != null).Select(o => o.Arrow!.Value), Array.Empty()); + if (LambdaDefaultKinds.Count == 0) + problems.Add("lambda-default × kind: the 8951 pool runs no bare read of a member from a `def`'s default in its own class, so the set has no kind and no control"); + Carried("lambda-default", LambdaDefaultKinds, c => new[] { c.Cell.Target }); + Carried("lambda-default", Enum.GetValues(), Part); + foreach (var kind in LambdaDefaultKinds) + { + Partition($"lambda-default × position of {kind}", BareReadPositions(kind), + lambdaDefaults.Where(c => c.Cell.Target == kind && c.Cell.Key!.Part() != ScopeDefaultOwner.Def).Select(c => c.Cell.Position!.Value), ExcludedLambdaDefaultPositions.Keys); + } + foreach (var c in lambdaDefaults) + { + // What the cell's program holds, by the parser: a `def`'s cell no lambda, a lambda's cell the one lambda of its spelling. + var owner = c.Cell.Key!.Part()!.Value; + var lambdas = LambdasWithADefault(c.Cell.Source); + var owed = DefaultOwners[owner].Arrow is { } arrow ? new[] { arrow } : Array.Empty(); + if (!lambdas.SequenceEqual(owed)) + problems.Add($"lambda-default × owner: {c.Cell.Id} is {owner}'s, and the parser finds [{string.Join(", ", lambdas.Select(a => a ? "an arrow lambda" : "a `lambda`"))}] with a parameter default in its program"); + } + // A read's cell stands beside its control: the same owner at the same position with a literal default. + foreach (var slot in lambdaDefaults.Where(c => !Marks(c).Contains(LiteralDefault)).Select(c => (Owner: c.Cell.Key!.Part()!.Value, Position: c.Cell.Position!.Value)).Distinct()) + { + if (!lambdaDefaults.Any(c => Marks(c).Contains(LiteralDefault) && c.Cell.Key!.Part() == slot.Owner && c.Cell.Position == slot.Position)) + problems.Add($"lambda-default × control: {slot.Owner} at {slot.Position} has no cell with a literal default, which is what says the slot itself runs"); + } + // The class-body rule's two axes, as a bare sibling read has them: both orders, with and without a module binding of the name. + foreach (var sibling in lambdaDefaults.Where(c => !Marks(c).Contains(LiteralDefault)).GroupBy(c => string.Join("/", c.Cell.Key!.Parts.Where(p => p is not Harness.Order && !(p is string text && text.StartsWith("outer=", StringComparison.Ordinal)))))) + { + var seen = sibling.Select(c => (c.Cell.Key!.Part(), c.Cell.Outer != BindingKind.None)).ToHashSet(); + foreach (var order in new Harness.Order?[] { Harness.Order.Earlier, Harness.Order.Later }) + { + foreach (var bound in new[] { false, true }.Where(b => !seen.Contains((order, b)))) + problems.Add($"lambda-default × sibling: {sibling.Key} has no cell at {order} {(bound ? "under" : "without")} a module binding of the name"); + } + } + + // alias-target + Partition("alias-target × site", Enum.GetValues(), AliasSites.Keys, ExcludedAliasScopes.Keys); + Partition("alias-target × type body", Enum.GetValues(), AliasTypeHosts.Keys, ExcludedAliasTypeHosts.Keys); + Partition("alias-target × shape", new[] { typeof(AstTypeAlias), typeof(AstTypeAnnotation), typeof(AstFunctionType) }.SelectMany(DeclaredProperties), + AliasShapes.Keys, ExcludedAliasShapeProperties.Keys); + Carried("alias-target", AllAliasSites().Select(s => s.Label).Concat(AliasShapes.Values.Select(s => s.Label)), Marks); + Carried("alias-target", Enum.GetValues(), Part); + Carried("alias-target", Enum.GetValues(), Part); + Partition("alias-target × target × use", + Enum.GetValues().SelectMany(t => Enum.GetValues().Select(u => (Target: t, Use: u))), + Route("alias-target").Select(c => (Target: c.Cell.Key!.Part()!.Value, Use: c.Cell.Key.Part()!.Value)), ExcludedAliasUses.Keys); + // A shape's name is the alias itself in some cell, or the shape says why it cannot be. + var selfReaching = Route("alias-target").Where(c => c.Cell.Key!.Part() == ScopeAliasTarget.Itself).SelectMany(Marks).ToHashSet(StringComparer.Ordinal); + Partition("alias-target × self-reaching shape", AliasShapes.Values.Select(v => v.Label).Distinct(), AliasShapes.Values.Select(v => v.Label).Where(selfReaching.Contains), ExcludedSelfReachingShapes.Keys); + // The two binders of an alias, by the 8951 pool's census of binder sites: a third is a site this axis has not placed. + var binders = NameResolutionRosters.BinderSites.Keys.Where(k => k.Contains("TypeAliasSymbol.CreateFrom", StringComparison.Ordinal)).OrderBy(k => k, StringComparer.Ordinal).ToList(); + if (!binders.SequenceEqual(AliasBinderSites.OrderBy(k => k, StringComparer.Ordinal))) + problems.Add($"alias-target × site: the binder census holds [{string.Join("; ", binders)}], and the sites were placed for [{string.Join("; ", AliasBinderSites)}]"); + + // A probe has its exclusion, and an exclusion that rests on the compiler has its probe. What rests on the compiler is read + // from the reason's own text: one that names a diagnostic code or cites an issue says what a program does today. + var reasons = ExcludedDeclarations.Values.Concat(ExcludedDeclarationHosts.Values).Concat(ExcludedValueTypes.Values).Concat(ExcludedTypedReads.Values) + .Concat(ExcludedTypedSpellings.Values).Concat(ExcludedTypedPositions.Values).Concat(ExcludedTypedPlacements.Values).Concat(ExcludedTypedReceivers.Values).Concat(ExcludedCalleeBinders.Values).Concat(ExcludedCalleeOuters.Values) + .Concat(ExcludedAdmissionTables.Values).Concat(ExcludedModuleMemberShapes.Values).Concat(ExcludedModuleCollections.Values).Concat(ExcludedAliasScopes.Values).Concat(ExcludedAliasTypeHosts.Values) + .Concat(ExcludedOwnSpellings.Values).Concat(ExcludedOwnPlacements.Values).Concat(ExcludedEnumSpellings.Values).Concat(ExcludedImportKinds.Values) + .Concat(ExcludedBuiltinReceivers.Values).Concat(ExcludedLambdaUses.Values).Concat(ExcludedLambdaDefaultPositions.Values) + .Concat(AllConstantHosts().SelectMany(h => Enum.GetValues().Select(sp => OwnSpellingSkips(h.Host, sp, inside: true))).Where(r => r != null).Select(r => r!)) + .Concat(ExcludedAliasShapeProperties.Values).Concat(ExcludedOrders.Values.SelectMany(o => o.Values)) + .Concat(ExcludedConstScopes.Values).Concat(ExcludedConstTypeHosts.Values).Concat(ExcludedConstantReaders.Values).Concat(ExcludedClrTypeMemberShapes.Values) + .Concat(ExcludedOwnReads.Values).Concat(ExcludedConstantForms.Values).Concat(ExcludedAliasUses.Values).Concat(ExcludedSelfReachingShapes.Values) + .Concat(AllConstantHosts().SelectMany(h => new[] { "int", "() -> int", "m0.T" }.Select(t => HostSkips(h.Host, t))).Where(r => r != null).Select(r => r!)) + .Concat(AllConstantHosts().SelectMany(h => TypedReads.Keys.Select(k => OwnKindSkips(h.Host, k, inside: true))).Where(r => r != null).Select(r => r!)) + .Concat(EnumReadKinds.Keys.SelectMany(k => Enum.GetValues().Select(sp => EnumReadSkips(sp, k))).Where(r => r != null).Select(r => r!)) + .ToHashSet(StringComparer.Ordinal); + foreach (var orphan in BehaviourProbes.Keys.Concat(CrashProbes.Keys).Where(k => !reasons.Contains(k))) + problems.Add($"a probe guards the reason '{orphan}', and no exclusion gives it"); + foreach (var unprobed in reasons.Where(r => NamesWhatTheCompilerDoes.IsMatch(r) && !BehaviourProbes.ContainsKey(r) && !CrashProbes.ContainsKey(r)).OrderBy(r => r, StringComparer.Ordinal)) + problems.Add($"the exclusion '{unprobed}' names a diagnostic code or an issue, so it rests on what the compiler does today, and no probe holds it"); + foreach (var twice in BehaviourProbes.Keys.Where(CrashProbes.ContainsKey)) + problems.Add($"the reason '{twice}' has a probe in this process and one in a child process: it rests on one behaviour"); + foreach (var blank in reasons.Where(string.IsNullOrWhiteSpace)) + problems.Add($"an exclusion gives no reason: '{blank}'"); + return problems; + } + + /// What marks a reason as resting on the compiler: a diagnostic code (Sharpy's or C#'s) or an issue's number. + private static readonly Regex NamesWhatTheCompilerDoes = new(@"\b(?:SPY|CS)\d{4}\b|#\d{3,}"); + + /// The binder sites the alias sites were placed for ('s summary). + internal static readonly string[] AliasBinderSites = + { + "NameResolver.Members.cs:ResolveTypeAliasDeclaration(TypeAliasSymbol.CreateFrom(typeAlias, _currentFilePath))", + "TypeChecker.Utilities.cs:RegisterScopedTypeAlias(TypeAliasSymbol.CreateFrom(typeAlias, _currentFilePath))", + }; + + internal static IEnumerable AllAliasSites() + => AliasSites.OrderBy(e => e.Key).SelectMany(e => e.Key == ScopeKind.TypeBody ? AliasTypeHosts.OrderBy(h => h.Key).SelectMany(h => h.Value) : e.Value); + + [Fact] + public void Axes_EveryValueIsGeneratedOrExcluded() + { + var problems = AxisProblems(GeneratedCases()); + Assert.True(problems.Count == 0, string.Join("\n", problems)); + } + + /// The falsifier of an exclusion that rests on the compiler DYING: the child process still dies of it, and still + /// compiles the control. When the crash stops, the value is owed its cells. + [Fact] + public void Exclusions_RestingOnACompilerCrash_GoRedWhenItStops() + { + var problems = new List(); + foreach (var (reason, probe) in CrashProbes.OrderBy(e => e.Key, StringComparer.Ordinal)) + { + var control = CompileInChildProcess(probe.Control); + if (!control.Compiled) + problems.Add($"'{reason}': the child process does not compile the control, so it says nothing about the crash: {control}"); + var run = CompileInChildProcess(probe.Source); + if (!probe.Holds(run)) + problems.Add($"'{reason}' rests on {probe.Expected}, and the child process now gives {run}: generate the value, or give the exclusion its new reason"); + } + Assert.True(problems.Count == 0, string.Join("\n", problems)); + } + + /// The falsifier of every exclusion that rests on compiler behaviour: its probe still does what the reason says. + [Fact] + public void Exclusions_RestingOnTheCompiler_GoRedWhenItChanges() + { + var problems = new List(); + foreach (var (reason, probes) in BehaviourProbes.OrderBy(e => e.Key, StringComparer.Ordinal)) + { + foreach (var probe in probes.All) + { + var run = RunSharpy(probe.Source, probe.Stdlib, SharpyExecTimeoutMs); + if (!probe.Holds(run)) + { + problems.Add($"'{reason}' rests on {probe.Expected}, and the probe now gives [{string.Join(",", run.ErrorCodes.Distinct())}{(run.CsCode != null ? " " + run.CsCode : "")}]" + + $"{(run.ErrorCodes.Count == 0 ? $" stdout '{Harness.Normalize(run.Stdout)}'" : "")}: generate the value, or give the exclusion its new reason"); + } + } + } + Assert.True(problems.Count == 0, string.Join("\n", problems)); + } +} diff --git a/src/Sharpy.Compiler.Tests/Conformance/ScopeMeaningDifferentialTests.Readers.cs b/src/Sharpy.Compiler.Tests/Conformance/ScopeMeaningDifferentialTests.Readers.cs new file mode 100644 index 000000000..96e95410b --- /dev/null +++ b/src/Sharpy.Compiler.Tests/Conformance/ScopeMeaningDifferentialTests.Readers.cs @@ -0,0 +1,234 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Sharpy.Compiler.Semantic.Validation; +using Sharpy.Compiler.Tests.Infrastructure; +using Xunit; + +namespace Sharpy.Compiler.Tests.Conformance; + +/// +/// The readers of a constant position's admission table, by a census of the compiler's source: what +/// is total over (plan-777361's stage 0; the owner's ruling 8 of +/// 2026-11-20, #2423 comment 7042723494). In its own file for the Roslyn namespaces, whose TypeKind is not the compiler's. +/// +public sealed partial class ScopeMeaningDifferentialTests +{ + /// The readers of an AdmissionTable value in a set of sources, and the calls whose table cannot be traced. + internal sealed record ReaderCensus(IReadOnlyDictionary Sites, IReadOnlyList Problems); + + /// + /// The call-site census of ConstantDefaultClassifier.IsAdmitted: a syntax scan, so a fact can hand it a snippet. A call + /// that names its table (AdmissionTable.X) is a reader, keyed File:Method. A call whose table is a parameter of + /// its method is no reader itself: the readers are that method's callers in the same file, each keyed by ITS method with the + /// table it passes. Anything else (a table that is neither, a method group, a method nobody calls) is a problem, never a + /// silent skip. + /// + internal static ReaderCensus ScanClassifierReaders(IEnumerable<(string File, string Text)> sources) + { + var sites = new Dictionary(StringComparer.Ordinal); + var problems = new List(); + var seen = new Dictionary(StringComparer.Ordinal); + + static string? Rightmost(ExpressionSyntax e) => e switch + { + IdentifierNameSyntax id => id.Identifier.ValueText, + MemberAccessExpressionSyntax m => m.Name.Identifier.ValueText, + _ => null, + }; + static AdmissionTable? TableOf(ExpressionSyntax e) + => e is MemberAccessExpressionSyntax m && Rightmost(m.Expression) == nameof(AdmissionTable) && Enum.TryParse(m.Name.Identifier.ValueText, out var table) ? table : null; + static MethodDeclarationSyntax? MethodOf(SyntaxNode node) => node.Ancestors().OfType().FirstOrDefault(); + static string Where(string file, SyntaxNode node) => $"{file}:{node.GetLocation().GetLineSpan().StartLinePosition.Line + 1}"; + + void Add(string file, SyntaxNode at, AdmissionTable table) + { + var key = $"{file}:{MethodOf(at)?.Identifier.ValueText ?? ""}"; + int ordinal = seen[key] = seen.GetValueOrDefault(key) + 1; + sites[ordinal == 1 ? key : $"{key}#{ordinal}"] = table; + } + + foreach (var (file, text) in sources.OrderBy(s => s.File, StringComparer.Ordinal)) + { + var root = CSharpSyntaxTree.ParseText(text).GetRoot(); + foreach (var name in root.DescendantNodes().OfType() + .Where(m => m.Name.Identifier.ValueText == nameof(ConstantDefaultClassifier.IsAdmitted) && Rightmost(m.Expression) == nameof(ConstantDefaultClassifier))) + { + if (name.Parent is not InvocationExpressionSyntax call || call.Expression != name || call.ArgumentList.Arguments.Count != 2) + { + problems.Add($"{Where(file, name)}: `{name.Parent}` uses the classifier's admission as something other than a call with a kind and a table"); + continue; + } + var tableArgument = call.ArgumentList.Arguments[1].Expression; + if (TableOf(tableArgument) is { } named) + { + Add(file, call, named); + continue; + } + var method = MethodOf(call); + int index = method == null || tableArgument is not IdentifierNameSyntax parameter + ? -1 + : method.ParameterList.Parameters.ToList().FindIndex(p => p.Identifier.ValueText == parameter.Identifier.ValueText); + if (index < 0) + { + problems.Add($"{Where(file, call)}: `{call}` takes its table from neither an AdmissionTable value nor a parameter of its method"); + continue; + } + var callers = root.DescendantNodes().OfType() + .Where(c => Rightmost(c.Expression) == method!.Identifier.ValueText && c.ArgumentList.Arguments.Count > index).ToList(); + if (callers.Count == 0) + problems.Add($"{Where(file, call)}: {method!.Identifier.ValueText} takes its table as a parameter, and nothing in {file} calls it"); + foreach (var caller in callers) + { + if (TableOf(caller.ArgumentList.Arguments[index].Expression) is { } passed) + Add(file, caller, passed); + else + problems.Add($"{Where(file, caller)}: `{caller}` passes {method!.Identifier.ValueText} a table that is no AdmissionTable value"); + } + } + } + return new ReaderCensus(sites, problems); + } + + /// The census over the compiler's own source. + private static readonly Lazy ClassifierReaders = new(() => + { + var dir = Path.Combine(DispatchSiteScan.FindRepoRoot(), "src", "Sharpy.Compiler"); + return ScanClassifierReaders(Directory.GetFiles(dir, "*.cs", SearchOption.AllDirectories) + .Where(f => !f.Contains($"{Path.DirectorySeparatorChar}bin{Path.DirectorySeparatorChar}", StringComparison.Ordinal) + && !f.Contains($"{Path.DirectorySeparatorChar}obj{Path.DirectorySeparatorChar}", StringComparison.Ordinal)) + .Select(f => (Path.GetFileName(f), File.ReadAllText(f)))); + }); + + // ------------------------------------------------------------------------------------------- // + // The compiler in a child process: for a behaviour that ends the process + // ------------------------------------------------------------------------------------------- // + + /// How a child process that compiled one source ended: its exit code, what it wrote, whether the compiler + /// answered (compiled or refused), and whether the process died of a stack overflow. + internal sealed record ChildCompile(int ExitCode, string Stdout, string Stderr) + { + public bool Compiled => ExitCode == 0 && Stdout.Contains(ChildCompiledMark, StringComparison.Ordinal); + public bool Answered => Compiled || Stdout.Contains(ChildRefusedMark, StringComparison.Ordinal); + public bool Overflowed => ExitCode != 0 && !Answered && Stderr.Contains("Stack overflow", StringComparison.OrdinalIgnoreCase); + + public override string ToString() + => $"exit {ExitCode}, stdout '{Stdout.Trim()}', stderr '{Stderr.TrimStart().Split('\n', 2)[0].Trim()}'"; + } + + private const string ChildCompiledMark = "CHILD-COMPILED"; + private const string ChildRefusedMark = "CHILD-REFUSED"; + + /// The child's whole program: compile the file it is handed with the compiler's public API and say how it went. + private const string ChildDriverSource = + "public static class ScopeMeaningChild\n" + + "{\n" + + " public static int Main(string[] args)\n" + + " {\n" + + " var api = new Sharpy.Compiler.CompilerApi(null, new[] { args[1] });\n" + + " var result = api.Compile(System.IO.File.ReadAllText(args[0]));\n" + + " System.Console.WriteLine(result.Success ? \"" + ChildCompiledMark + "\" : \"" + ChildRefusedMark + "\");\n" + + " return result.Success ? 0 : 1;\n" + + " }\n" + + "}\n"; + + /// + /// Compiles in a process of its own and reports how the process ended. The child is a driver + /// compiled here against the compiler this test loaded, written beside it (the test's output directory), so dotnet exec + /// resolves the compiler and everything it references from the driver's own directory; nothing depends on a built CLI. + /// + internal static ChildCompile CompileInChildProcess(string source) + { + var compilerAssembly = typeof(Sharpy.Compiler.CompilerApi).Assembly.Location; + var directory = Path.GetDirectoryName(compilerAssembly)!; + var name = $"scope-meaning-child-{Environment.ProcessId}-{Guid.NewGuid():N}"; + var driver = Path.Combine(directory, name + ".dll"); + var runtimeConfig = Path.Combine(directory, name + ".runtimeconfig.json"); + var sourceFile = Path.Combine(Path.GetTempPath(), name + ".spy"); + try + { + var runtime = Path.GetDirectoryName(typeof(object).Assembly.Location)!; + var references = new[] { typeof(object).Assembly.Location, Path.Combine(runtime, "System.Runtime.dll"), Path.Combine(runtime, "System.Console.dll"), compilerAssembly } + .Select(path => (MetadataReference)MetadataReference.CreateFromFile(path)); + var compilation = CSharpCompilation.Create(name, new[] { CSharpSyntaxTree.ParseText(ChildDriverSource) }, references, new CSharpCompilationOptions(OutputKind.ConsoleApplication)); + var emitted = compilation.Emit(driver); + Assert.True(emitted.Success, "the child's driver does not compile: " + string.Join("; ", emitted.Diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error))); + File.WriteAllText(runtimeConfig, "{ \"runtimeOptions\": { \"tfm\": \"net" + Environment.Version.Major + ".0\", \"framework\": { \"name\": \"Microsoft.NETCore.App\", \"version\": \"" + Environment.Version.Major + ".0.0\" } } }"); + File.WriteAllText(sourceFile, source); + + var start = new System.Diagnostics.ProcessStartInfo("dotnet") + { + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + WorkingDirectory = directory, + }; + start.ArgumentList.Add("exec"); + start.ArgumentList.Add(driver); + start.ArgumentList.Add(sourceFile); + start.ArgumentList.Add(Sharpy.TestInfrastructure.SharpyCoreReference.Location); + using var process = System.Diagnostics.Process.Start(start)!; + var stdout = process.StandardOutput.ReadToEndAsync(); + var stderr = process.StandardError.ReadToEndAsync(); + if (!process.WaitForExit(120_000)) + { + process.Kill(entireProcessTree: true); + return new ChildCompile(-1, stdout.Result, "timed out after 120 s"); + } + process.WaitForExit(); + return new ChildCompile(process.ExitCode, stdout.Result, stderr.Result); + } + finally + { + foreach (var file in new[] { driver, runtimeConfig, sourceFile }) + { + try + { + File.Delete(file); + } + catch (IOException) + { + } + } + } + } + + /// The child's own control: it compiles a program that compiles and refuses one that does not, so a death is the + /// compiler's and not the child's. + [Fact] + public void CompileInChildProcess_AnswersForAProgramThatCompiles_AndForOneThatDoesNot() + { + var compiled = CompileInChildProcess("def main() -> None:\n print(1)\n"); + Assert.True(compiled.Compiled && !compiled.Overflowed, compiled.ToString()); + var refused = CompileInChildProcess("def main() -> None:\n print(nosuch)\n"); + Assert.True(refused is { Compiled: false, Answered: true, Overflowed: false }, refused.ToString()); + } + + /// The census's own control: it sees a call that names its table, follows a table that is a parameter to each + /// caller, numbers a method's second site, and reports a call it cannot trace. An absence ("no reader without a host") is + /// only as good as this. + [Fact] + public void ConstantReaders_TheCensusSeesACallSite_AndFollowsATableParameter() + { + const string source = + "class V {\n" + + " void A(S s) { Judge(s, AdmissionTable.ParameterDefault); }\n" + + " void B(S s) { Judge(s, Validation.AdmissionTable.ConstInitializer); }\n" + + " void Judge(S s, AdmissionTable table) { if (!ConstantDefaultClassifier.IsAdmitted(K(s), table)) return; }\n" + + " void C() { var a = ConstantDefaultClassifier.IsAdmitted(k, AdmissionTable.DecoratorArgument); var b = Validation.ConstantDefaultClassifier.IsAdmitted(k, AdmissionTable.DecoratorArgument); }\n" + + " void D(AdmissionTable[] ts) { ConstantDefaultClassifier.IsAdmitted(k, ts[0]); }\n" + + " void E() { System.Func f = ConstantDefaultClassifier.IsAdmitted; }\n" + + "}\n"; + var census = ScanClassifierReaders(new[] { ("V.cs", source) }); + Assert.Equal( + new[] { "V.cs:A=ParameterDefault", "V.cs:B=ConstInitializer", "V.cs:C#2=DecoratorArgument", "V.cs:C=DecoratorArgument" }, + census.Sites.Select(s => $"{s.Key}={s.Value}").OrderBy(s => s, StringComparer.Ordinal)); + Assert.Equal(2, census.Problems.Count); + Assert.Contains(census.Problems, p => p.StartsWith("V.cs:6:", StringComparison.Ordinal) && p.Contains("neither an AdmissionTable value nor a parameter", StringComparison.Ordinal)); + Assert.Contains(census.Problems, p => p.StartsWith("V.cs:7:", StringComparison.Ordinal) && p.Contains("something other than a call", StringComparison.Ordinal)); + + // The compiler's own readers: every one traced, none a problem. + Assert.Empty(ClassifierReaders.Value.Problems); + Assert.NotEmpty(ClassifierReaders.Value.Sites); + } +} diff --git a/src/Sharpy.Compiler.Tests/Conformance/ScopeMeaningDifferentialTests.cs b/src/Sharpy.Compiler.Tests/Conformance/ScopeMeaningDifferentialTests.cs new file mode 100644 index 000000000..0c2b5d0d9 --- /dev/null +++ b/src/Sharpy.Compiler.Tests/Conformance/ScopeMeaningDifferentialTests.cs @@ -0,0 +1,1113 @@ +using System.Diagnostics; +using System.Text.Json; +using System.Text.RegularExpressions; +using Sharpy.Compiler.Diagnostics; +using Sharpy.Compiler.Semantic.Validation; +using Sharpy.Compiler.Tests.Properties.Differential; +using Sharpy.TestInfrastructure.Integration; +using Sharpy.TestInfrastructure.Oracles; +using Xunit; +using Xunit.Abstractions; +using Harness = Sharpy.Compiler.Tests.Conformance.NameResolutionDifferentialTests; +using TypeKind = Sharpy.Compiler.Semantic.TypeKind; + +namespace Sharpy.Compiler.Tests.Conformance; + +/// Whether a declaration says its first value: R-QI's axis. Closed: a declaration has an initializer, has +/// none, or (a property) computes its value in accessor bodies. +internal enum ScopeInitializer +{ + Present, + Absent, + AccessorBodies, +} + +/// Where a declaration's type comes from. Closed: written, or inferred from the initializer. +internal enum ScopeAnnotation +{ + Annotated, + Inferred, +} + +/// What a constant position is handed (#2432's expression-kind axis; charter §3.20l calls 43 and 45; the +/// owner's ruling 7 of 2026-11-20, #2423 comment 7042723494): every kind of member a constant position's answer is +/// asked about, and the two chains. Each member kind is the image of what the compiler records for the member: +/// +/// a member of a referenced MODULE: the collection of discovery's ModuleOverloads that holds it, a field refined +/// by FieldSignature.IsConst × IsGuarded and a function by its overload count +/// (; ruling 13, comment 7046304965); +/// a member of a referenced TYPE: the subclasses of ClrMemberResolution, a field refined by what C# reads as a +/// constant from metadata (FieldInfo.IsLiteral, or a DecimalConstantAttribute: the owner's ruling 17, #2423 +/// comment 7049561049) and whether its type is an enum (); +/// a member of an enum the program declares: EnumMemberAccessKind and the member itself, per enum shape +/// (); +/// any other name the program declares: , refined by +/// (). +/// +/// The two chains are closed by call 45. How each member is SPELLED and where its reader stands is a second axis, per where +/// the member lives (ruling 12; ScopeMeaningDifferentialTests.Axes.cs). +internal enum ScopeConstantKind +{ + /// A constant of a referenced assembly: a CLR literal field read through a Stdlib module. + ClrLiteralField, + + /// A module variable of the .spy stdlib, whose storage is guarded (N3): no constant. + StdlibModuleVariable, + + /// A static of a referenced assembly's module that is neither literal nor guarded (a static property, a + /// static readonly field): no constant. + ClrStaticMember, + + /// A function of a referenced module with one overload, read uncalled (math.sqrt): a function value, no constant. + ModuleFunction, + + /// A function of a referenced module with several overloads, read uncalled (math.log): the slot's type picks + /// one, and the value is no constant. + ModuleFunctionGroup, + + /// A literal field of a referenced type (int.max_value, Math.PI): a C# constant. + ClrTypeLiteralField, + + /// A const decimal of a referenced type (decimal.one): in metadata a static readonly field + /// carrying DecimalConstantAttribute, which C# reads back as a constant wherever a decimal can be one: a + /// default and a const, never an attribute argument (ruling 17). + ClrTypeDecimalConstant, + + /// A member of a referenced enum (DayOfWeek.Monday): a C# constant. + ClrTypeEnumMember, + + /// A static field of a referenced type that is no literal (static readonly): no constant. + ClrTypeStaticField, + + /// A static property of a referenced type: no constant. + ClrTypeStaticProperty, + + /// A static method of a referenced type with one overload, read uncalled: a function value, no constant. + ClrTypeMethod, + + /// A static method of a referenced type whose signature the checker's resolver declines to type (a char + /// parameter: Char.is_ascii_digit), read uncalled: the checker types it object, and the value is no constant. + ClrTypeDeclinedMethod, + + /// A static method group of a referenced type, read uncalled. Where the slot has a function type, that type + /// selects the overload and the read is a function value, no constant (the owner's ruling 29, #2423 comment 7052893050; + /// SPY0336 today: #2277). Where it has none (an attribute argument) the group is no value at all (SPY0336). + ClrTypeMethodGroup, + + /// A member of an int enum of the program: a C# constant. + IntEnumMember, + + /// An int enum member's .value: the underlying integer, a C# constant (ruling 2). + IntEnumValue, + + /// An int enum member's .name: a call of the name channel, no constant. + IntEnumName, + + /// A member of a string enum of the program: a singleton object, no C# constant. + StringEnumMember, + + /// A string enum member's .value: the singleton's property, no constant. + StringEnumValue, + + /// A string enum member's .name: the singleton's property, no constant. + StringEnumName, + + /// A name the program declares, read under each spelling and from each placement the typed-read set has a + /// reader for (OwnSpellings): the cell's target is the kind. + OwnMember, + + /// A comparison chain whose every link is a constant. + ComparisonChain, + + /// A comparison chain with a link that is no constant. + ChainWithNonConstantLink, +} + +/// What a type alias's target names: a type that exists, nothing, or the alias itself, directly or +/// through a ring of aliases. Closed. +internal enum ScopeAliasTarget +{ + Declared, + Missing, + Itself, +} + +/// Whether anything names a type alias. Closed. +internal enum ScopeAliasUse +{ + Used, + Unused, +} + +/// Who calls a constructor overload. Closed: another constructor of the type, a method of it, an initializer +/// of it, a function outside it. +internal enum ScopeOverloadCaller +{ + InitDelegation, + MethodBody, + StaticInitializer, + ModuleFunction, +} + +/// Whose parameter default reads a member of the class its declaration stands in: a method's (the control: a +/// def's default is evaluated in the class body, and reads the member today), a lambda's, an arrow lambda's. The +/// two lambdas are the image of LambdaExpression.IsArrowSyntax; a default has no fourth owner in a class body that +/// plan-777361 holds (a delegate's and a signature-only method's are #2779's). +internal enum ScopeDefaultOwner +{ + Def, + Lambda, + ArrowLambda, +} + +/// +/// Stage 0 of plan-777361 (P78; verification contract §11), the owner's rulings of 2026-11-20 (#2423 comments +/// 7030074628 item 1, 7039834146 item 5, 7042723494 items 7 to 9, 7046304965 items 12 and 13, 7049561049 items 17, 19 and 20, +/// and 7050154806 item 22): the cells of rules N1, N2, N4 and N7 that the P77a pool +/// () has no program for, as a generated test type of their own. A cell is +/// a , and its tag and rule are READ from the rule table (name-resolution-rules.txt, #2487): +/// the generator writes the program, what it prints when it runs and the codes a refusal may carry, and never a verdict. +/// +/// Seven cell sets. Every axis is the image of a compiler enumeration read by reflection, a census of the compiler's own +/// output, the P77a pool, or a set named closed; every value is generated or excluded with its reason +/// (), and an exclusion that rests on what the compiler does today +/// has a probe that goes red when it stops (). The +/// axes and their sources are in ScopeMeaningDifferentialTests.Axes.cs: +/// +/// no-initializer (R-QI): × × host +/// (TypeKind) × declared type (SemanticType's subclasses); +/// typed-read: a read handed to a bool slot, × +/// × order × Spelling × , the last two as the P77a pool runs them; +/// callee: a binder's name called under an outer binding of the name, binder ( and +/// the parameter) × outer (); +/// constant-kind (#2432): host (the call sites of ConstantDefaultClassifier.IsAdmitted, each with its +/// AdmissionTable, and the enum member's value; the constant slots no classifier call judges besides are #2779's, by +/// the owner's decision: ) × × the read's spelling and the +/// reader's placement (an import's forms, a type's alias, and for the program's own names Spelling × inside or outside +/// the member's type, as the typed-read set's readers have them); +/// init-overload: × order; +/// lambda-default (D4; ruling 19): × the class-level initializer that holds the +/// lambda (the positions at which the P77a pool runs a bare read of the member from its own type) × order × a module +/// binding of the name; +/// alias-target: declaration site (ScopeKind × TypeKind) × target shape (the properties of the +/// alias's AST records) × × × order. An alias that reaches +/// itself has its unused cells, which must run, and no used one (#2769). +/// +/// Known-red cells are rows of scope-meaning-differential-allowlist.txt (a missing file reads as empty), each citing +/// the issue whose fix turns it green, by the cell's class (). A must-refuse cell refused under a code its cell does not admit is listed as +/// with the lane wrong-code: the refusal is another rule's. +/// +[Trait("Category", "GapDiscovery")] +public sealed partial class ScopeMeaningDifferentialTests : IntegrationTestBase +{ + private const string AllowlistFileName = "scope-meaning-differential-allowlist.txt"; + private const int SharpyExecTimeoutMs = 12_000; + private const int PythonBatchTimeoutMs = 600_000; + + public ScopeMeaningDifferentialTests(ITestOutputHelper output) : base(output) => MuteCompilePath = true; + + /// A generated case: the cell, and whether python runs the same program with the same meaning (no twin, no vote). + internal sealed record Case(NameCell Cell, bool Twin); + + private const string Main = "def main() -> None:\n"; + + private static CellKey Key(params object?[] parts) + { + var kept = parts.Where(p => p != null).Select(p => p!).ToArray(); + return new CellKey(string.Join("/", kept.Select(p => Convert.ToString(p, System.Globalization.CultureInfo.InvariantCulture))), kept); + } + + /// A cell before the table has said what it must do. is what it prints if it runs; + /// the codes a refusal of it may carry. + private static Case Draft(CellKey key, Family family, string source, string? model, string[] refusal, bool twin, + BindingKind target = BindingKind.None, BindingKind outer = BindingKind.None, ReadPosition? position = null, + LocalTarget? construct = null, bool stdlib = false, DeclaringRelation? relation = null) + => new( + new NameCell + { + Key = key, + Family = family, + Source = source, + Tag = SharpyTag.Unruled, + Model = model, + Python = model == null ? new PyOutcome(PyKind.OtherError, "no twin") : PyOutcome.Ran(model), + Rule = "", + Target = target, + Outer = outer, + Position = position, + Construct = construct, + Relation = relation, + SeedRefusalCodes = new HashSet(refusal, StringComparer.Ordinal), + NeedsStdlib = stdlib, + }, + twin); + + private static string Indent(string text) => string.Join("\n", text.Split('\n').Select(l => " " + l)); + + private static string Lines(IEnumerable lines) => string.Join("\n", lines) + "\n"; + + // ------------------------------------------------------------------------------------------- // + // no-initializer (R-QI) + // ------------------------------------------------------------------------------------------- // + + /// The code R-QI's refusal carries: plan-777361's D7 and D9 introduce it with the refusal itself. + internal const string NoInitializerRefusal = "SPY0620"; + + private static IEnumerable NoInitializerCases() + { + foreach (var (kind, d) in Declarations.OrderBy(e => e.Key)) + { + foreach (var host in d.InType ? DeclarationHosts.OrderBy(h => h.Key).SelectMany(h => h.Value).ToArray() : new DeclarationHost?[] { null }) + { + foreach (var type in ValueTypes.OrderBy(e => e.Key.Name, StringComparer.Ordinal).SelectMany(e => e.Value)) + { + foreach (var initializer in Enum.GetValues()) + { + if (initializer == ScopeInitializer.AccessorBodies && d.Accessor == null) + continue; + // A struct's instance field initializer is a constant position (the 8951 pool's StructFieldInitializer): + // a declared type whose value is no constant has no initializer to write there. + if (initializer == ScopeInitializer.Present && kind == BindingKind.InstanceField && host?.Kind == TypeKind.Struct && !type.Constant) + continue; + string F(string text) => text.Replace("{T}", type.Spelling, StringComparison.Ordinal).Replace("{L}", type.Literal, StringComparison.Ordinal); + string decl = initializer switch + { + ScopeInitializer.Present => F(d.Text) + " = " + type.Literal, + ScopeInitializer.Absent => F(d.Text), + _ => F(d.Accessor!), + }; + var lines = new List(); + if (type.Prelude != null) + lines.Add(type.Prelude); + // The read lands in a local of the declared type before it is shown: a member of an untyped read is #2417's. + var print = $" v: {type.Spelling} = {d.Read}\n print({string.Format(System.Globalization.CultureInfo.InvariantCulture, type.Show, "v")})"; + if (kind == BindingKind.LocalVar) + { + lines.Add(Main.TrimEnd()); + lines.Add(Indent(decl)); + if (initializer == ScopeInitializer.Absent) + lines.AddRange(d.Stored!.Select(s => Indent(F(s)))); + lines.Add(print); + } + else + { + if (d.InType) + { + lines.Add($"{host!.Keyword} H:"); + lines.Add(Indent(decl)); + if (initializer == ScopeInitializer.Absent && d.Stored != null) + lines.AddRange(d.Stored.Select(s => Indent(F(s)))); + } + else + lines.Add(decl); + lines.Add(Main.TrimEnd()); + lines.Add(print); + } + // Read where R-QI refuses; the kinds it leaves alone store first, so every cell that runs prints the stored value. + bool twin = d.Twin && type.Twin && host is null or { Kind: TypeKind.Class } + && (initializer == ScopeInitializer.Present || (initializer == ScopeInitializer.Absent && d.Stored != null)); + // R-QI's refusal is SPY0620, the code plan-777361 introduces for it (D7, D9): no compiler says it yet, so a + // cell that must be refused is red until then, and a refusal under any other code is another rule's. + yield return Draft(Key("read", "no-initializer", kind, initializer, host, type.Label), Family.Read, Lines(lines), "5", + new[] { NoInitializerRefusal }, twin, target: kind); + } + } + } + } + } + + // ------------------------------------------------------------------------------------------- // + // typed-read: a read handed to a bool slot is the type mismatch, whatever the order, spelling and position + // ------------------------------------------------------------------------------------------- // + + /// The probe: a function that takes a bool. Handed an int the checker has typed, the call is + /// SPY0220; handed a read it has not typed, it is C#'s CS1503 behind SPY0908 (measured @ 55846bb3f). + private const string Probe = "def nb(v: bool) -> int:\n return 1"; + + private const string Five = "def five() -> int:\n return 5"; + + /// The reader of a constant-only position: its slot is declared bool, since a call is no constant there. + private static string[] BoolSlot(ReadPosition p, string read) => p switch + { + ReadPosition.ParameterDefault => new[] { $"def r(self, p0: bool = {read}) -> int:", " return 1" }, + ReadPosition.DataclassFieldInitializer or ReadPosition.StructFieldInitializer => new[] { $"r: bool = {read}" }, + _ => throw new ArgumentOutOfRangeException(nameof(p), p, "not a constant-only position"), + }; + + private static IEnumerable TypedReadCases() + { + foreach (var (kind, t) in TypedReads.OrderBy(e => e.Key)) + { + foreach (var annotation in Enum.GetValues()) + { + var text = annotation == ScopeAnnotation.Annotated ? t.Annotated : t.Inferred; + if (text == null) + continue; + foreach (var reader in TypedReaders.Where(r => r.Kind == kind)) + { + foreach (var order in new[] { Harness.Order.Earlier, Harness.Order.Later }) + { + string receiver = reader.Spelling switch + { + Harness.Spelling.Bare => "", + Harness.Spelling.SelfDot => "self.", + Harness.Spelling.Alias => t.Level == MemberLevel.Instance ? "A()." : "A.", + Harness.Spelling.Qualified => t.Level == MemberLevel.Instance ? "H()." : "H.", + _ => throw new ArgumentOutOfRangeException(nameof(reader), reader.Spelling, "no receiver"), + }; + string read = receiver + t.Member; + bool constantOnly = Harness.IsConstantOnly(reader.Position); + string probed = constantOnly ? read : $"nb({read})"; + var prelude = new List { Probe }; + if (t.NeedsFive) + prelude.Add(Five); + var body = new List(); + if (reader.Inside) + { + // The reader is a sibling of the member, in the member's own type. + var members = constantOnly ? BoolSlot(reader.Position, probed) : Harness.PlaceInClass(reader.Position, reader.Nesting, probed).Members.ToArray(); + var member = text.Split('\n'); + body.Add(Harness.HostHeader(reader.Position)); + body.AddRange((order == Harness.Order.Earlier ? member.Concat(members) : members.Concat(member)).Select(l => " " + l)); + if (reader.Spelling == Harness.Spelling.Alias) + body.Add("type A = H"); + } + else + { + var target = new List(); + if (t.Level == MemberLevel.Module) + target.Add(text); + else + { + target.Add("class H:\n" + Indent(text)); + if (reader.Spelling == Harness.Spelling.Alias) + target.Add("type A = H"); + } + var host = new List(); + if (constantOnly) + { + host.Add(Harness.HostHeader(reader.Position).Replace("H:", "Rd:", StringComparison.Ordinal)); + host.AddRange(BoolSlot(reader.Position, probed).Select(l => " " + l)); + } + else if (ModulePlacedPositions.Contains(reader.Position)) + host.AddRange(Harness.PlaceAtModule(reader.Position, reader.Nesting, probed).Lines); + else + { + host.Add(Harness.HostHeader(reader.Position).Replace("H:", "Rd:", StringComparison.Ordinal)); + host.AddRange(Harness.PlaceInClass(reader.Position, reader.Nesting, probed).Members.Select(l => " " + l)); + } + body.AddRange(order == Harness.Order.Earlier ? target.Concat(host) : host.Concat(target)); + } + var lines = prelude.Concat(body).ToList(); + if (string.Join("\n", body).Contains("ap(lambda", StringComparison.Ordinal)) + lines.Insert(0, "def ap(f: () -> int) -> int:\n return f()"); + lines.Add(Main + " print(1)"); + yield return Draft(Key("read", "typed-read", kind, annotation, order, reader.Spelling, reader.Position, reader.Nesting), Family.Read, Lines(lines), null, + new[] { "SPY0220" }, twin: false, target: kind, position: reader.Position); + } + } + } + } + } + + // ------------------------------------------------------------------------------------------- // + // callee: the innermost binding of a name is what a call of it calls + // ------------------------------------------------------------------------------------------- // + + private const string One = "def one() -> int:\n return 1"; + private const string Twelve = "def twelve() -> int:\n return 12"; + private const string CalleeCm = "class CM:\n def __enter__(self) -> () -> int:\n return one\n def __exit__(self) -> None:\n pass"; + + private static IEnumerable CalleeCases() + { + foreach (var (outer, o) in CalleeOuters.OrderBy(e => e.Key)) + { + // The binders: a parameter, which is no LocalTarget, and each construct target. + foreach (var binder in new object[] { BindingKind.Parameter }.Concat(CalleeBinders.Keys.OrderBy(k => k).Cast())) + { + string n = o.Name; + bool parameter = binder is BindingKind; + // The statements that bind n to `one` and print its call; a parameter binder's function is declared below. + string[] stmts = parameter ? new[] { "print(f(one))" } : CalleeBinders[(LocalTarget)binder].Select(s => s.Replace("{n}", n, StringComparison.Ordinal)).ToArray(); + var lines = new List { One }; + if (o.Text.Contains("twelve()", StringComparison.Ordinal)) + lines.Add(Twelve); + if (binder is LocalTarget.WithAs) + lines.Add(CalleeCm); + string call; + switch (o.Scope) + { + case OuterScope.Module: + if (o.Text.Length > 0) + lines.Insert(0, o.Text); + if (parameter) + lines.Add($"def f({n}: () -> int) -> int:\n return {n}()"); + lines.Add(Main + string.Join("\n", stmts.Select(s => " " + s))); + break; + case OuterScope.Member: + // The outer binding is a member of H, and the binder sits in a method of H. + lines.Add("class H:\n" + Indent(o.Text) + "\n" + + (parameter + ? $" def m(self, {n}: () -> int) -> int:\n return {n}()" + : " def m(self) -> None:\n" + string.Join("\n", stmts.Select(s => " " + s)))); + call = parameter ? "print(H().m(one))" : "H().m()"; + lines.Add(Main + " " + call); + break; + default: + // The outer binding is a local of the enclosing function, and the binder sits in a nested def. + string signature = outer == BindingKind.Parameter ? $"def outer0({n}: int) -> None:" : "def outer0() -> None:"; + var enclosing = new List { signature }; + if (outer != BindingKind.Parameter) + enclosing.Add(Indent(o.Text)); + enclosing.Add(parameter + ? $" def g({n}: () -> int) -> int:\n return {n}()\n print(g(one))" + : " def g() -> None:\n" + string.Join("\n", stmts.Select(s => " " + s)) + "\n g()"); + lines.Add(string.Join("\n", enclosing)); + lines.Add(Main + (outer == BindingKind.Parameter ? " outer0(12)" : " outer0()")); + break; + } + var construct = binder as LocalTarget?; + yield return Draft(Key("local", "callee", binder, $"outer={outer}"), Family.Local, Lines(lines), "1", Array.Empty(), + twin: o.Twin && binder is BindingKind or LocalTarget.For or LocalTarget.Comprehension, + target: parameter ? BindingKind.Parameter : construct == LocalTarget.Comprehension ? BindingKind.Inner : BindingKind.LocalVar, + outer: outer, position: ReadPosition.FunctionBody, construct: construct, stdlib: o.Stdlib); + } + } + } + + // ------------------------------------------------------------------------------------------- // + // constant-kind (#2432) + // ------------------------------------------------------------------------------------------- // + + private static IEnumerable ConstantKindCases() + { + foreach (var (table, host) in AllConstantHosts()) + { + foreach (var (kind, expressions) in ConstantExpressions.OrderBy(e => e.Key)) + { + foreach (var e in expressions) + { + if (HostSkips(host, e.Type) != null) + continue; + // Python has the module-qualified read of a literal and the chain; every other spelling is Sharpy's own cell. + bool twin = host.Twin && (kind == ScopeConstantKind.ComparisonChain || (kind == ScopeConstantKind.ClrLiteralField && e.Spelling == ImportSpellings[0].Label)); + yield return ConstantCase(Key("read", "constant-kind", table, host.Label, kind, e.Form, e.Label, e.Spelling), table, host, kind, e.Text, e.Type, e.Prints, e.Show, + imports: e.Import, prelude: e.Prelude, refusals: e.Refusals, target: e.Target, stdlib: e.Stdlib, twin: twin); + } + } + foreach (var own in OwnReadsOf(host)) + { + if (HostSkips(host, own.Type) != null) + continue; + bool inside = own.Relation == DeclaringRelation.Self; + yield return ConstantCase( + Key("read", "constant-kind", table, host.Label, ScopeConstantKind.OwnMember, own.Kind, own.Annotation, own.Spelling, own.Relation, own.Order, + own.Outer == BindingKind.None ? null : $"outer={own.Outer}", own.Form, + inside && own.Spelling == Harness.Spelling.Bare ? BareSibling : null, inside && host.InMethod ? InMethod : null), + table, host, ScopeConstantKind.OwnMember, own.Text, own.Type, own.Prints, own.Show, imports: null, prelude: own.Prelude, refusals: own.Refusals, target: own.Kind, + stdlib: false, twin: false, own: own); + } + } + } + + /// One cell: the expression's imports and declarations, then the host's program around it. What main shows is + /// the slot's value read into a local of the slot's type first, since a call on a function-typed property is #2770's. A + /// read from the member's own type takes the host's Inside program, with the member above or below the slot. + private static Case ConstantCase(CellKey key, AdmissionTable? table, ConstantHost host, ScopeConstantKind kind, string text, string type, string prints, string show, + string? imports, string? prelude, string[]? refusals, BindingKind target, bool stdlib, bool twin, OwnRead? own = null) + { + var lines = new List(); + if (host.Imports != null) + lines.Add(host.Imports); + if (imports != null) + lines.Add(imports); + if (prelude != null) + lines.Add(prelude); + string program = host.Program; + if (own?.Relation == DeclaringRelation.Self) + { + bool below = own.Order == Harness.Order.Later; + program = host.Inside! + .Replace("{above}", below ? "" : own.Member, StringComparison.Ordinal) + .Replace("{below}", below ? own.Member : "", StringComparison.Ordinal) + .Replace("{after}", own.After ?? "", StringComparison.Ordinal); + } + lines.Add(program.Replace("{T}", type, StringComparison.Ordinal).Replace("{e}", text, StringComparison.Ordinal) + .Replace("{s}", string.Format(System.Globalization.CultureInfo.InvariantCulture, show, "v"), StringComparison.Ordinal)); + return Draft(key, Family.Read, Lines(lines), host.PrintsOne ? "1" : prints, own?.Only ?? new[] { host.Refusal }.Concat(refusals ?? Array.Empty()).ToArray(), twin, + target: target, outer: own?.Outer ?? BindingKind.None, position: host.Position, stdlib: stdlib, relation: own?.Relation == DeclaringRelation.Self ? DeclaringRelation.Self : null); + } + + // ------------------------------------------------------------------------------------------- // + // init-overload: a constructor's overload set is the whole body's + // ------------------------------------------------------------------------------------------- // + + private static IEnumerable InitOverloadCases() + { + const string Target = "def __init__(self, x: int):\n self.x = x"; + foreach (var caller in Enum.GetValues()) + { + foreach (var order in new[] { Harness.Order.Earlier, Harness.Order.Later }) + { + (string? member, string? function, string read) = caller switch + { + ScopeOverloadCaller.InitDelegation => ("def __init__(self):\n self.__init__(7)", null, "P().x"), + ScopeOverloadCaller.MethodBody => ("def mk(self) -> int:\n return P(7).x", null, "P(1).mk()"), + ScopeOverloadCaller.StaticInitializer => ("@static\nd: int = P(7).x", null, "P.d"), + _ => ((string?)null, "def mk() -> int:\n return P(7).x", "mk()"), + }; + var members = new List { "x: int = 0" }; + if (member == null) + members.Add(Target); + else + members.AddRange(order == Harness.Order.Earlier ? new[] { Target, member } : new[] { member, Target }); + var type = "class P:\n" + string.Join("\n", members.Select(Indent)); + var lines = function == null ? new[] { type } : order == Harness.Order.Earlier ? new[] { type, function } : new[] { function, type }; + yield return Draft(Key("read", "init-overload", caller, order), Family.Read, string.Join("\n", lines) + $"\n{Main} print({read})\n", "7", + Array.Empty(), twin: false, target: BindingKind.Constructor); + } + } + } + + // ------------------------------------------------------------------------------------------- // + // lambda-default: a lambda's parameter default at a type body's level is evaluated in the type body (D4; ruling 19) + // ------------------------------------------------------------------------------------------- // + + /// + /// A parameter default that reads a member of its own class by its bare name, per owner of the default + /// (). The owner's ruling 19 (#2423 comment 7049561049; unchanged by item 22 of 7050154806): a + /// lambda's default in a class-level initializer "reads the member", as a def's does, and the planning session reads + /// that as one rule for both lambda spellings. So the class-body rule decides the read (D3): the member where it stands + /// above the initializer or no module binding holds the name, N2's refusal at-or-after under one (SPY0619, which lands + /// with plan-777361's T8). The member's value is 5 and a module binding's 12, so a default that reads the wrong one prints + /// it. The lambda is called where it stands (), at each position + /// derives; each owner and position has its control, the same slot with a LITERAL + /// default, which runs today, so a red cell beside it is red for what its default reads. + /// + private static IEnumerable LambdaDefaultCases() + { + foreach (var (owner, o) in DefaultOwners.OrderBy(e => e.Key)) + { + foreach (var position in o.Arrow == null ? new[] { ReadPosition.ParameterDefault } : LambdaDefaultKinds.SelectMany(LambdaDefaultPositions).Distinct().OrderBy(p => p).ToArray()) + { + var placed = Harness.PlaceInClass(position, Harness.Nesting.Direct, o.Text.Replace("{d}", "5", StringComparison.Ordinal)); + var lines = new[] { Harness.HostHeader(position) }.Concat(placed.Members.Select(l => " " + l)); + yield return Draft(Key("read", "lambda-default", owner, position, LiteralDefault), Family.Read, Lines(lines) + Harness.MainPrinting(placed.Access, placed.Setup), "5", + Array.Empty(), twin: Harness.HostHeader(position) == "class H:", position: position); + } + } + foreach (var kind in LambdaDefaultKinds.OrderBy(k => k)) + { + var t = TypedReads[kind]; + foreach (var (owner, o) in DefaultOwners.OrderBy(e => e.Key)) + { + foreach (var position in o.Arrow == null ? new[] { ReadPosition.ParameterDefault } : LambdaDefaultPositions(kind).ToArray()) + { + foreach (var annotation in Enum.GetValues()) + { + var declaration = annotation == ScopeAnnotation.Annotated ? t.Annotated : t.Inferred; + if (declaration == null) + continue; + foreach (var order in new[] { Harness.Order.Earlier, Harness.Order.Later }) + { + foreach (var outer in new[] { BindingKind.None, SiblingOuter(callable: false) }) + { + var placed = Harness.PlaceInClass(position, Harness.Nesting.Direct, o.Text.Replace("{d}", t.Member, StringComparison.Ordinal)); + var member = declaration.Split('\n'); + var lines = new List(); + if (outer != BindingKind.None) + lines.Add("const x: int = 12"); + lines.Add(Harness.HostHeader(position)); + lines.AddRange((order == Harness.Order.Earlier ? member.Concat(placed.Members) : placed.Members.Concat(member)).Select(l => " " + l)); + bool refused = order == Harness.Order.Later && outer != BindingKind.None; + // Python evaluates a default where its `def` or `lambda` stands, top to bottom: it is the same program + // where the member stands above, in a plain class. + bool twin = order == Harness.Order.Earlier && Harness.HostHeader(position) == "class H:"; + yield return Draft(Key("read", "lambda-default", owner, kind, annotation, position, order, outer == BindingKind.None ? null : $"outer={outer}"), + Family.Read, Lines(lines) + Harness.MainPrinting(placed.Access, placed.Setup), "5", refused ? new[] { "SPY0619" } : Array.Empty(), twin, + target: kind, outer: outer, position: position, relation: DeclaringRelation.Self); + } + } + } + } + } + } + } + + // ------------------------------------------------------------------------------------------- // + // alias-target: an alias names a type that exists, used or not, wherever it is declared and whatever its shape + // ------------------------------------------------------------------------------------------- // + + private const string AliasTargetClass = "class C0:\n v: int = 1"; + + /// The orders an alias has against what its target names: a declared type stands above or below it, a missing one + /// has no declaration to stand anywhere, and the alias itself is reached directly or through a ring. + internal static Harness.Order[] AliasOrders(ScopeAliasTarget target) => target switch + { + ScopeAliasTarget.Declared => new[] { Harness.Order.Earlier, Harness.Order.Later }, + ScopeAliasTarget.Missing => new[] { Harness.Order.Earlier }, + _ => new[] { Harness.Order.Self, Harness.Order.Cycle }, + }; + + private static IEnumerable AliasTargetCases() + { + foreach (var site in AllAliasSites()) + { + foreach (var shape in AliasShapes.Values.DistinctBy(s => s.Label).OrderBy(s => s.Label, StringComparer.Ordinal)) + { + foreach (var target in Enum.GetValues()) + { + // A name a module qualifies is never the alias (ExcludedSelfReachingShapes says so, and the axes fact holds the two together). + if (target == ScopeAliasTarget.Itself && shape.Import != null) + continue; + foreach (var use in Enum.GetValues()) + { + // Named by an annotation, a self-reaching alias kills the compiler's process (#2769; ExcludedAliasUses). + if (target == ScopeAliasTarget.Itself && use == ScopeAliasUse.Used) + continue; + foreach (var order in AliasOrders(target)) + { + string generic = shape.Generic ? "[T]" : ""; + // What the target names: the program's class, nothing, the alias itself, or the next alias of a ring of two. + string named = target switch + { + ScopeAliasTarget.Declared => shape.Declared, + ScopeAliasTarget.Missing => "nosuch", + _ when order == Harness.Order.Self => "K0" + generic, + _ => "K1", + }; + var aliases = new List { $"type K0{generic} = " + shape.Target.Replace("{N}", named, StringComparison.Ordinal) }; + if (target == ScopeAliasTarget.Itself && order == Harness.Order.Cycle) + aliases.Add("type K1 = K0" + (shape.Generic ? "[int]" : "")); + var lines = new List(); + if (shape.Import != null) + lines.Add($"import {shape.Import}"); + if (target == ScopeAliasTarget.Declared && order == Harness.Order.Earlier) + lines.Add(AliasTargetClass); + // Every alias of the site stands at the site's own indentation. + var slot = site.Program.Split('\n').First(l => l.Contains("{alias}", StringComparison.Ordinal)); + var indent = slot[..slot.IndexOf("{alias}", StringComparison.Ordinal)]; + lines.Add(site.Program + .Replace("{alias}", string.Join("\n" + indent, aliases), StringComparison.Ordinal) + .Replace("{use}", use == ScopeAliasUse.Used ? site.Use.Replace("{K}", shape.Generic ? "K0[int]" : "K0", StringComparison.Ordinal) : site.NoUse, StringComparison.Ordinal)); + if (target == ScopeAliasTarget.Declared && order == Harness.Order.Later) + lines.Add(AliasTargetClass); + lines.Add(Main + " print(1)"); + yield return Draft(Key("read", "alias-target", target, use, order, site.Label, shape.Label), Family.Read, Lines(lines), "1", + new[] { "SPY0202" }, twin: false, target: BindingKind.ModuleTypeAlias, position: ReadPosition.TypeAliasTarget, stdlib: shape.Import != null); + } + } + } + } + } + } + + // ------------------------------------------------------------------------------------------- // + // The pool: every case, with the tag and rule its one row of the table gives it + // ------------------------------------------------------------------------------------------- // + + private static readonly Lazy> Drafts = new(() => + NoInitializerCases().Concat(TypedReadCases()).Concat(CalleeCases()).Concat(ConstantKindCases()).Concat(InitOverloadCases()).Concat(LambdaDefaultCases()) + .Concat(AliasTargetCases()).ToList()); + + /// The cells as generated, before the table is read: what counts a row's cells over. + internal static IReadOnlyList DraftCells() => Drafts.Value.Select(c => c.Cell).ToList(); + + private static readonly Lazy> Pool = new(() => Drafts.Value.Select(c => + { + var rows = Harness.RowsOf(Harness.RuleTable(), c.Cell); + return rows.Count == 1 && rows[0].Tag is { } tag ? c with { Cell = c.Cell with { Tag = tag, Rule = rows[0].Rule } } : c; + }).ToList()); + + internal static IReadOnlyList GeneratedCases() => Pool.Value; + + /// The pool's totality: ids are unique, every cell has its one row and took its verdict from it, a cell that + /// must run says what it prints, and a twin is a program that runs. + internal static List TotalityFailures(IReadOnlyList pool) + { + var failures = new List(); + foreach (var dup in pool.GroupBy(c => c.Cell.Id, StringComparer.Ordinal).Where(g => g.Count() > 1)) + failures.Add($"duplicate cell id {dup.Key}"); + var rows = Harness.RuleTable(); + foreach (var c in pool) + { + var matched = Harness.RowsOf(rows, c.Cell); + if (matched.Count != 1) + failures.Add($"RuleTable: {c.Cell.Id} matches {(matched.Count == 0 ? "no row" : "rows L" + string.Join(", L", matched.Select(r => r.Line)))}"); + else if (matched[0].Tag != c.Cell.Tag || matched[0].Rule != c.Cell.Rule) + failures.Add($"RuleTable: {c.Cell.Id} carries {c.Cell.Tag} under '{c.Cell.Rule}', and its row L{matched[0].Line} says {matched[0].Tag?.ToString() ?? "*"} under {matched[0].Rule}"); + if (c.Cell.Tag is not (SharpyTag.MustRun or SharpyTag.MustRefuse)) + failures.Add($"{c.Cell.Id}: a cell of this pool must run or must be refused, and its row says {c.Cell.Tag}"); + if (c.Cell.Tag == SharpyTag.MustRun && c.Cell.Model == null) + failures.Add($"{c.Cell.Id}: its row says must-run and the generator gives it nothing to print"); + if (c.Twin && c.Cell.Tag != SharpyTag.MustRun) + failures.Add($"{c.Cell.Id}: a twin is python running the same program, and the cell does not run"); + // A must-refuse cell that admits no code can only ever be judged a false refusal: no refusal could turn it green, + // and nothing would say which refusal is the rule's (the review of PR #2767, F6). + if (c.Cell.Tag == SharpyTag.MustRefuse && c.Cell.SeedRefusalCodes is not { Count: > 0 }) + failures.Add($"{c.Cell.Id}: its row says must-refuse under {c.Cell.Rule}, and the generator names no code its refusal may carry"); + if (c.Cell.Id.Any(char.IsWhiteSpace)) + failures.Add($"'{c.Cell.Id}': an id is one word, since an allowlist row is ` # `"); + } + failures.AddRange(Harness.RuleTableRowFailures(rows, Harness.RuleTablePools.SelectMany(p => p.Cells()).ToList())); + return failures.Count > 60 ? failures.Take(60).Append($"… {failures.Count} failures in all").ToList() : failures; + } + + [Fact] + public void RuleTable_EveryCaseHasOneRow_AndTakesItsVerdictFromIt() + { + var failures = TotalityFailures(GeneratedCases()); + Assert.True(failures.Count == 0, string.Join("\n", failures)); + } + + // ------------------------------------------------------------------------------------------- // + // Judge, route, ratchet + // ------------------------------------------------------------------------------------------- // + + /// The issue whose fix turns a red cell of a route green: #2432 for a constant position's verdict, #2423 for the rest + /// (R-QI's cells, the untyped forward read, the callee lookup, a lambda's default, the alias refusal: charter §3.20l). A typed read that is + /// red at the EARLIER order is no order defect, and it and its later twin are #2417's; an alias that reaches itself is + /// #2769's; in a constant position, N2's cells are #2423's, as is a bare sibling read red at the later order alone, a + /// member that dies of an instance receiver is #2147's, and a method group refused where its slot's function type selects + /// an overload is #2277's (). + internal static readonly IReadOnlyDictionary RouteIssues = new Dictionary(StringComparer.Ordinal) + { + ["no-initializer"] = "#2423", + ["typed-read"] = "#2423", + ["callee"] = "#2423", + ["constant-kind"] = "#2432", + ["init-overload"] = "#2423", + ["lambda-default"] = "#2423", + ["alias-target"] = "#2423", + }; + + /// The class of an untyped member-access read (#2417): typed at neither order. + internal const string UntypedAtEitherOrder = "#2417"; + + /// The class of an alias whose target reaches the alias itself (#2769): unruled, so the unused cells keep running + /// and a red one is that tracker's. + internal const string SelfReachingAlias = "#2769"; + + /// The class of a bare sibling read at-or-after its member under a module binding of the name (N2): the class-body + /// rule's refusal is #2423's whatever the position, a constant one included. + internal const string ClassBodyRule = "#2423"; + + /// The class of a constant or static member read through an instance (#2147): C# refuses the emitted instance + /// access (CS0176) at every position, so a constant position's cell that dies of it waits on that tracker. + internal const string StaticThroughInstance = "#2147"; + + /// The C# error that is #2147's symptom. + internal const string StaticThroughInstanceCs = "CS0176"; + + /// The class of an overloaded method group of a referenced type read where a function type stands at the slot + /// (#2277; the owner's ruling 29, #2423 comment 7052893050): the slot's type selects the overload and the read must run, + /// and today the checker refuses every read of the group. No constant position's fix cures it. + internal const string OverloadByTargetType = "#2277"; + + /// The refusal that is #2277's symptom there. + internal const string MethodGroupRefusal = "SPY0336"; + + internal sealed record Result(Case Case, Harness.SharpyRun Run, SharpyKind Kind, VerdictClass Class, bool WrongCode, string? PythonFailure); + + /// The harness's table, and one more red: a must-refuse cell refused under a code it does not admit. + internal static (VerdictClass Class, bool WrongCode) Judge(NameCell cell, SharpyKind kind, Harness.SharpyRun run) + { + var verdict = Harness.Judge(cell, kind, run.Stdout); + bool wrongCode = verdict == VerdictClass.Match && cell.Tag == SharpyTag.MustRefuse && Harness.RefusalReasonFailure(cell, run) != null; + return (wrongCode ? VerdictClass.FalseRefusal : verdict, wrongCode); + } + + /// The id of a typed-read cell's twin at the earlier order, or null for a cell that has none. + internal static string? EarlierTwinId(NameCell cell) + { + if (cell.Key is not { Route: "typed-read" } key || key.Part() is not { } order) + return null; + return order == Harness.Order.Earlier ? cell.Id : Key(key.Parts.Select(p => p is Harness.Order ? Harness.Order.Earlier : p).ToArray()).Text; + } + + /// The id of a bare sibling read's twin above the reader in a constant position, or null for a cell that is no + /// such read at the later order. + internal static string? SiblingAboveTwinId(NameCell cell) + { + if (cell.Key is not { Route: "constant-kind" } key || !key.Marks.Contains(BareSibling) || key.Part() != Harness.Order.Later) + return null; + return Key(key.Parts.Select(p => p is Harness.Order ? Harness.Order.Earlier : p).ToArray()).Text; + } + + /// The cite a red cell's row must carry. are the ids red in the same run: a typed read + /// whose earlier twin is red is untyped whatever the order, so declaring before reading does not cure it and it is #2417's. + internal static string ProposedCite(Result r, IReadOnlySet redIds) + { + var issue = RouteIssues.GetValueOrDefault(r.Case.Cell.Key!.Route ?? "", "UNROUTED"); + if (EarlierTwinId(r.Case.Cell) is { } earlier && redIds.Contains(earlier)) + issue = UntypedAtEitherOrder; + if (r.Case.Cell.Key.Part() == ScopeAliasTarget.Itself) + issue = SelfReachingAlias; + // N2's refusal, and a sibling read that is red BELOW its member alone (above it the same position gives the same + // member its verdict): the class-body rule's order, whatever the position. + if (r.Case.Cell.Key.Route == "constant-kind" && r.Case.Cell.Rule == "N2") + issue = ClassBodyRule; + if (SiblingAboveTwinId(r.Case.Cell) is { } above && !redIds.Contains(above)) + issue = ClassBodyRule; + if (r.Case.Cell.Key.Route == "constant-kind" && r.Case.Cell.Key.Part() == Harness.Spelling.SelfDot && r.Run.CsCode == StaticThroughInstanceCs) + issue = StaticThroughInstance; + // A method group that must run and is refused as a group: no overload was selected, whatever the position. + if (r.Case.Cell.Key.Part() == ScopeConstantKind.ClrTypeMethodGroup && r.Case.Cell.Tag == SharpyTag.MustRun && r.Run.ErrorCodes.Contains(MethodGroupRefusal)) + issue = OverloadByTargetType; + string lane = r.WrongCode ? "wrong-code" : r.Class switch + { + VerdictClass.Ice => "ice", + VerdictClass.FalseRefusal => "false-refusal", + VerdictClass.RuntimeThrow => "runtime-throw", + VerdictClass.SilentWrong when r.Case.Cell.Tag == SharpyTag.MustRefuse => "missing-refusal", + _ => "silent-wrong", + }; + return $"{issue} {lane}"; + } + + private static bool IsRed(VerdictClass c) => c is VerdictClass.Ice or VerdictClass.FalseRefusal or VerdictClass.SilentWrong or VerdictClass.RuntimeThrow; + + /// The ratchet: a red cell has its row, a row has its red cell of that class and cite, and python or the harness + /// failing to judge a cell is never a row's to hold. + internal static List RatchetFailures(IReadOnlyList results, IReadOnlyDictionary rows) + { + var failures = new List(); + var redIds = results.Where(r => IsRed(r.Class)).Select(r => r.Case.Cell.Id).ToHashSet(StringComparer.Ordinal); + foreach (var r in results) + { + rows.TryGetValue(r.Case.Cell.Id, out var row); + if (r.PythonFailure != null) + failures.Add($"GeneratorBug {r.Case.Cell.Id}: {r.PythonFailure}{(row == null ? "" : " (and a row lists it: not allowlistable)")}"); + else if (r.Class == VerdictClass.Harness) + failures.Add($"Harness {r.Case.Cell.Id}: Sharpy {Describe(r)}"); + else if (IsRed(r.Class) && row == null) + failures.Add($"{r.Class} {r.Case.Cell.Id} ({r.Case.Cell.Tag}, {r.Case.Cell.Rule}): Sharpy {Describe(r)}; model '{r.Case.Cell.Model}'"); + else if (IsRed(r.Class) && row!.Class != r.Class) + failures.Add($"{r.Case.Cell.Id}: listed as {row.Class}, now {r.Class}: MOVED, update or delete the row"); + else if (!IsRed(r.Class) && row != null) + failures.Add($"{r.Case.Cell.Id}: listed as {row.Class}, now {r.Class}: STALE, delete the row"); + else if (IsRed(r.Class) && row!.Cite != ProposedCite(r, redIds)) + failures.Add($"{r.Case.Cell.Id}: the row cites '{row.Cite}' and the route says '{ProposedCite(r, redIds)}'"); + } + return failures; + } + + private static string Describe(Result r) + => r.Kind == SharpyKind.Ran + ? $"Ran '{Harness.Normalize(r.Run.Stdout)}'" + : $"{r.Kind} [{string.Join(",", r.Run.AllCodes.Distinct())}{(r.Run.CsCode != null ? " " + r.Run.CsCode : "")}]" + + (r.Kind == SharpyKind.RuntimeThrow ? $" stderr '{r.Run.Stderr.TrimStart().Split('\n', 2)[0].TrimEnd()}'" : ""); + + private bool _currentCellNeedsStdlib; + + protected override IEnumerable GetAdditionalReferenceAssemblyPaths() + { + if (_currentCellNeedsStdlib) + yield return SharpyStdlibReference.Location; + } + + private Harness.SharpyRun RunSharpy(string source, bool needsStdlib, int timeoutMs) + { + _currentCellNeedsStdlib = needsStdlib; + var r = CompileAndExecute(source, "scope_meaning.spy", executionTimeoutMs: timeoutMs); + var diagnostics = r.RawDiagnostics; + var all = diagnostics.Select(d => d.Code).Where(c => c != null).Select(c => c!).ToList(); + var errors = diagnostics.Where(d => d.Severity == CompilerDiagnosticSeverity.Error).Select(d => d.Code).Where(c => c != null).Select(c => c!).ToList(); + var cs = diagnostics.Where(d => d.Code == "SPY0908").Select(d => Regex.Match(d.Message, @"\bCS\d{4}\b")).Where(m => m.Success).Select(m => m.Value).FirstOrDefault(); + return new Harness.SharpyRun(r.Success, r.ExitCode, r.Exception != null, r.TimedOut, r.StandardOutput, r.StandardError, errors, all, cs); + } + + [SkippableFact] + public void ScopeMeaning_Sweep() + { + // The oracle is the pinned CPython (`.python-version`, 3.15): an older minor is no verdict, so it skips where it would answer. + var oracle = PythonBatchOracle.Over(PythonInterpreter.RequireOrSkip(minMinor: 15)); + var wall = Stopwatch.StartNew(); + var pool = GeneratedCases(); + var failures = TotalityFailures(pool); + + // --- Python arm: one batch over the cells python runs with the same meaning. --- + var requests = new List(); + var twinFailures = new Dictionary(); + for (int i = 0; i < pool.Count; i++) + { + if (!pool[i].Twin) + continue; + try + { + requests.Add(new PyRequest(i, TwinRenderer.Render(pool[i].Cell.Source))); + } + catch (Exception ex) when (ex is NotSupportedException or InvalidOperationException) + { + twinFailures[i] = $"renderer: {ex.Message}"; + } + } + var pythonById = oracle.RunBatch(requests, PythonBatchTimeoutMs); + + // --- Sharpy arm: production compile + execute, `run` and never `emit`. --- + var results = new List(pool.Count); + for (int i = 0; i < pool.Count; i++) + { + var c = pool[i]; + string? pythonFailure = twinFailures.GetValueOrDefault(i); + if (pythonFailure == null && c.Twin) + { + var python = pythonById.TryGetValue(i, out var verdict) ? Harness.ClassifyPython(verdict) : new PyOutcome(PyKind.SyntaxError, "no verdict from the runner"); + if (python != c.Cell.Python) + pythonFailure = $"the cell is modelled to print '{c.Cell.Model}' and python {python}"; + } + var run = RunSharpy(c.Cell.Source, c.Cell.NeedsStdlib, SharpyExecTimeoutMs); + if (run.TimedOut) + run = RunSharpy(c.Cell.Source, c.Cell.NeedsStdlib, SharpyExecTimeoutMs * 2); + var kind = Harness.ClassifySharpy(run); + var (cls, wrongCode) = Judge(c.Cell, kind, run); + results.Add(new Result(c, run, kind, cls, wrongCode, pythonFailure)); + } + + // --- Ratchet. --- + var universe = pool.Select(c => c.Cell.Id).ToHashSet(StringComparer.Ordinal); + var path = PythonInterpreter.FindRepoFile("src", "Sharpy.Compiler.Tests", "Conformance", AllowlistFileName); + var rows = InitializerDependencyDifferentialTests.ParseAllowlist(path == null ? Array.Empty() : File.ReadAllLines(path), universe, failures); + failures.AddRange(RatchetFailures(results, rows)); + + wall.Stop(); + var red = results.Where(r => IsRed(r.Class)).ToList(); + var redIds = red.Select(r => r.Case.Cell.Id).ToHashSet(StringComparer.Ordinal); + var dir = ReportDirectory(); + using (var writer = new StreamWriter(Path.Combine(dir, "scope-meaning-differential-cells.jsonl"))) + { + foreach (var r in results) + { + writer.WriteLine(JsonSerializer.Serialize(new + { + id = r.Case.Cell.Id, + tag = r.Case.Cell.Tag.ToString(), + rule = r.Case.Cell.Rule, + verdict = r.Class.ToString(), + wrongCode = r.WrongCode, + twin = r.Case.Twin, + python = r.PythonFailure, + sharpy = Describe(r), + source = r.Case.Cell.Source, + })); + } + } + File.WriteAllLines( + Path.Combine(dir, "scope-meaning-differential-proposed-allowlist.txt"), + red.OrderBy(r => r.Case.Cell.Id, StringComparer.Ordinal).Select(r => $"{r.Case.Cell.Id} {r.Class} # {ProposedCite(r, redIds)}")); + + var report = $"scope-meaning-differential: pool {pool.Count} ({pool.Count(c => c.Cell.Tag == SharpyTag.MustRun)} must-run, {pool.Count(c => c.Cell.Tag == SharpyTag.MustRefuse)} must-refuse), " + + $"python agreed {results.Count(r => r.Case.Twin && r.PythonFailure == null)}/{pool.Count(c => c.Twin)}, red {red.Count}, allowlist {rows.Count}, wall {wall.Elapsed.TotalSeconds:F1}s. " + + string.Join(" ", results.GroupBy(r => r.Case.Cell.Key!.Route).Select(g => $"{g.Key}={g.Count()}/red {g.Count(r => IsRed(r.Class))}")) + + " cites: " + string.Join(" ", rows.Values.GroupBy(r => r.Cite.Split(' ')[0]).OrderBy(g => g.Key, StringComparer.Ordinal).Select(g => $"{g.Key}={g.Count()}")); + Output.WriteLine(report); + Assert.True(failures.Count == 0, $"{failures.Count} failures. {report}\n{string.Join("\n", failures.Take(120))}"); + } + + private static string ReportDirectory() + { + var dir = new DirectoryInfo(AppContext.BaseDirectory); + while (dir != null && !File.Exists(Path.Combine(dir.FullName, "sharpy.sln"))) + dir = dir.Parent; + var tmp = Path.Combine(dir?.FullName ?? Path.GetTempPath(), ".claude", "tmp"); + Directory.CreateDirectory(tmp); + return tmp; + } + + // ------------------------------------------------------------------------------------------- // + // The ratchet's own fact: plain data in, no compile + // ------------------------------------------------------------------------------------------- // + + [Fact] + public void Ratchet_ARedCell_NeedsItsRow_AndARowNeedsItsRedCell() + { + var pool = GeneratedCases(); + var running = pool.First(c => c.Cell.Tag == SharpyTag.MustRun && c.Cell.Key!.Route == "callee"); + var later = pool.First(c => c.Cell.Tag == SharpyTag.MustRefuse && c.Cell.Key!.Route == "typed-read" && c.Cell.Key.Part() == Harness.Order.Later); + var earlier = pool.Single(c => c.Cell.Id == EarlierTwinId(later.Cell)); + static Harness.SharpyRun Ran(string stdout) => new(true, 0, false, false, stdout, "", Array.Empty(), Array.Empty(), null); + static Harness.SharpyRun Refused(string code) => new(false, null, false, false, "", "", new[] { code }, new[] { code }, null); + Result Of(Case c, Harness.SharpyRun run, string? pythonFailure = null) + { + var kind = Harness.ClassifySharpy(run); + var (cls, wrongCode) = Judge(c.Cell, kind, run); + return new Result(c, run, kind, cls, wrongCode, pythonFailure); + } + static Dictionary Rows(params (Case Case, VerdictClass Class, string Cite)[] rows) + => rows.ToDictionary(r => r.Case.Cell.Id, r => new InitializerDependencyDifferentialTests.AllowRow(r.Class, r.Cite), StringComparer.Ordinal); + var none = Rows(); + var listed = Rows((running, VerdictClass.SilentWrong, "#2423 silent-wrong")); + var wrong = Rows((later, VerdictClass.FalseRefusal, "#2423 wrong-code")); + + Assert.Empty(RatchetFailures(new[] { Of(running, Ran("1")) }, none)); + Assert.Empty(RatchetFailures(new[] { Of(running, Ran("12")) }, listed)); + Assert.Empty(RatchetFailures(new[] { Of(later, Refused("SPY0220")) }, none)); + Assert.Empty(RatchetFailures(new[] { Of(later, Refused("SPY0200")) }, wrong)); + + Assert.Contains("model", Assert.Single(RatchetFailures(new[] { Of(running, Ran("12")) }, none))); + Assert.Contains("STALE", Assert.Single(RatchetFailures(new[] { Of(running, Ran("1")) }, listed))); + Assert.Contains("MOVED", Assert.Single(RatchetFailures(new[] { Of(running, Refused("SPY0200")) }, listed))); + Assert.Contains("FalseRefusal", Assert.Single(RatchetFailures(new[] { Of(later, Refused("SPY0200")) }, none))); + Assert.Contains("STALE", Assert.Single(RatchetFailures(new[] { Of(later, Refused("SPY0220")) }, wrong))); + Assert.Contains("the route says", Assert.Single(RatchetFailures(new[] { Of(running, Ran("12")) }, Rows((running, VerdictClass.SilentWrong, "#2432 silent-wrong"))))); + Assert.Contains("GeneratorBug", Assert.Single(RatchetFailures(new[] { Of(running, Ran("1"), "python 4") }, none))); + + // By class (contract §10): a typed read red at BOTH orders is no order defect, so both rows are #2417's; red at the + // later order alone it is #2423's, and a row citing the other issue is refused. + var both = new[] { Of(earlier, Refused("SPY0200")), Of(later, Refused("SPY0200")) }; + Assert.Empty(RatchetFailures(both, Rows((earlier, VerdictClass.FalseRefusal, "#2417 wrong-code"), (later, VerdictClass.FalseRefusal, "#2417 wrong-code")))); + Assert.Contains("the route says '#2417", Assert.Single(RatchetFailures(both, Rows((earlier, VerdictClass.FalseRefusal, "#2417 wrong-code"), (later, VerdictClass.FalseRefusal, "#2423 wrong-code"))))); + var laterOnly = new[] { Of(earlier, Refused("SPY0220")), Of(later, Refused("SPY0200")) }; + Assert.Contains("the route says '#2423", Assert.Single(RatchetFailures(laterOnly, Rows((later, VerdictClass.FalseRefusal, "#2417 wrong-code"))))); + + // An alias whose target reaches the alias itself is unruled (#2769): its unused cell must run, and one that stops + // running is that tracker's row, never the alias refusal's (#2423). + var itself = pool.First(c => c.Cell.Key!.Part() == ScopeAliasTarget.Itself); + Assert.Equal(SharpyTag.MustRun, itself.Cell.Tag); + var refusedItself = new[] { Of(itself, Refused("SPY0202")) }; + Assert.Empty(RatchetFailures(refusedItself, Rows((itself, VerdictClass.FalseRefusal, "#2769 false-refusal")))); + Assert.Contains("the route says '#2769", Assert.Single(RatchetFailures(refusedItself, Rows((itself, VerdictClass.FalseRefusal, "#2423 false-refusal"))))); + + // A lambda's default that does not read the member is the class-body rule's cell (#2423), never a constant position's. + var lambdaDefault = pool.First(c => c.Cell.Key!.Route == "lambda-default" && c.Cell.Key.Part() == ScopeDefaultOwner.Lambda && c.Cell.Key.Part() == Harness.Order.Earlier); + Assert.Equal(SharpyTag.MustRun, lambdaDefault.Cell.Tag); + Assert.Empty(RatchetFailures(new[] { Of(lambdaDefault, Refused("SPY0200")) }, Rows((lambdaDefault, VerdictClass.FalseRefusal, "#2423 false-refusal")))); + Assert.Contains("the route says '#2423", Assert.Single(RatchetFailures(new[] { Of(lambdaDefault, Refused("SPY0200")) }, Rows((lambdaDefault, VerdictClass.FalseRefusal, "#2432 false-refusal"))))); + + // A constant position's cell is #2432's, with three classes that are another tracker's whatever the position. + static Harness.SharpyRun Ice(string cs) => new(false, null, false, false, "", "", new[] { "SPY0908" }, new[] { "SPY0908" }, cs); + bool Constant(Case c) => c.Cell.Key!.Route == "constant-kind"; + var member = pool.First(c => Constant(c) && c.Cell.Tag == SharpyTag.MustRun && c.Cell.Key!.Part() == Harness.Spelling.Qualified); + Assert.Contains("the route says '#2432", Assert.Single(RatchetFailures(new[] { Of(member, Ice("CS0133")) }, Rows((member, VerdictClass.Ice, "#2423 ice"))))); + // N2: a bare sibling at-or-after its reader under a module binding of the name is the class-body rule's refusal (#2423). + // It is so whatever its twin above the member does: red there too, the twin is the position's own and N2 is still N2. + var shadowed = pool.First(c => Constant(c) && c.Cell.Rule == "N2"); + var shadowedAbove = pool.Single(c => c.Cell.Id == SiblingAboveTwinId(shadowed.Cell)); + Assert.Equal(SharpyTag.MustRefuse, shadowed.Cell.Tag); + var shadowedBoth = new[] { Of(shadowedAbove, Ice("CS0133")), Of(shadowed, Ran("12")) }; + Assert.Empty(RatchetFailures(shadowedBoth, Rows((shadowedAbove, VerdictClass.Ice, "#2432 ice"), (shadowed, VerdictClass.SilentWrong, "#2423 missing-refusal")))); + Assert.Contains("the route says '#2423", Assert.Single(RatchetFailures(shadowedBoth, Rows((shadowedAbove, VerdictClass.Ice, "#2432 ice"), (shadowed, VerdictClass.SilentWrong, "#2432 missing-refusal"))))); + // A member read through `self` that dies of CS0176 is #2147's; dying of anything else it is the position's own. + var throughSelf = pool.First(c => Constant(c) && c.Cell.Tag == SharpyTag.MustRun && c.Cell.Key!.Part() == Harness.Spelling.SelfDot); + Assert.Empty(RatchetFailures(new[] { Of(throughSelf, Ice(StaticThroughInstanceCs)) }, Rows((throughSelf, VerdictClass.Ice, "#2147 ice")))); + Assert.Contains("the route says '#2147", Assert.Single(RatchetFailures(new[] { Of(throughSelf, Ice(StaticThroughInstanceCs)) }, Rows((throughSelf, VerdictClass.Ice, "#2432 ice"))))); + Assert.Contains("the route says '#2432", Assert.Single(RatchetFailures(new[] { Of(throughSelf, Ice("CS1736")) }, Rows((throughSelf, VerdictClass.Ice, "#2147 ice"))))); + // A method group that must run (a function type stands at its slot) and is refused as a group is #2277's; red any other + // way it is the position's own. + var group = pool.First(c => Constant(c) && c.Cell.Tag == SharpyTag.MustRun && c.Cell.Key!.Part() == ScopeConstantKind.ClrTypeMethodGroup); + Assert.Empty(RatchetFailures(new[] { Of(group, Refused(MethodGroupRefusal)) }, Rows((group, VerdictClass.FalseRefusal, "#2277 false-refusal")))); + Assert.Contains("the route says '#2277", Assert.Single(RatchetFailures(new[] { Of(group, Refused(MethodGroupRefusal)) }, Rows((group, VerdictClass.FalseRefusal, "#2432 false-refusal"))))); + Assert.Contains("the route says '#2432", Assert.Single(RatchetFailures(new[] { Of(group, Ice("CS1736")) }, Rows((group, VerdictClass.Ice, "#2277 ice"))))); + // A bare sibling read red BELOW its member alone is the class-body rule's order (#2423); red above it too, no order + // cures it and it is the position's own (#2432). + var below = pool.First(c => Constant(c) && c.Cell.Tag == SharpyTag.MustRun && c.Cell.Rule != "N2" && SiblingAboveTwinId(c.Cell) != null); + var aboveTwin = pool.Single(c => c.Cell.Id == SiblingAboveTwinId(below.Cell)); + Assert.Equal(SharpyTag.MustRun, aboveTwin.Cell.Tag); + var belowOnly = new[] { Of(aboveTwin, Ran(aboveTwin.Cell.Model)), Of(below, Refused("SPY0200")) }; + Assert.Empty(RatchetFailures(belowOnly, Rows((below, VerdictClass.FalseRefusal, "#2423 false-refusal")))); + Assert.Contains("the route says '#2423", Assert.Single(RatchetFailures(belowOnly, Rows((below, VerdictClass.FalseRefusal, "#2432 false-refusal"))))); + var atBoth = new[] { Of(aboveTwin, Refused("SPY0425")), Of(below, Refused("SPY0425")) }; + Assert.Empty(RatchetFailures(atBoth, Rows((aboveTwin, VerdictClass.FalseRefusal, "#2432 false-refusal"), (below, VerdictClass.FalseRefusal, "#2432 false-refusal")))); + Assert.Contains("the route says '#2432", Assert.Single(RatchetFailures(atBoth, Rows((aboveTwin, VerdictClass.FalseRefusal, "#2432 false-refusal"), (below, VerdictClass.FalseRefusal, "#2423 false-refusal"))))); + } +} diff --git a/src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt b/src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt index e9259c2f4..3ab6edfa3 100644 --- a/src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt +++ b/src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt @@ -569,7 +569,6 @@ read/ClassLiteralConst/ParameterDefault/Later/Bare/outer=ModuleComputedConst Sil read/ClassLiteralConst/ParameterDefault/Later/Bare/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal read/ClassLiteralConst/ParameterDefault/Later/Bare/outer=ModuleProperty SilentWrong # #2423 missing-refusal read/ClassLiteralConst/ParameterDefault/Later/Bare/outer=ModuleVar SilentWrong # #2423 missing-refusal -read/ClassLiteralConst/ParameterDefault/base/H.x SilentWrong # #2423 missing-refusal read/ClassLiteralConst/StaticInitializer/ComprehensionElement/Earlier/Bare/outer=ModuleDef FalseRefusal # #2423 false-refusal read/ClassLiteralConst/StaticInitializer/ComprehensionElement/Earlier/Bare/outer=ModuleVar SilentWrong # #2423 silent-wrong read/ClassLiteralConst/StaticInitializer/ComprehensionElement/Earlier/Bare/outer=None SilentWrong # #2423 missing-refusal @@ -914,14 +913,6 @@ read/ModuleDef/StaticInitializer/Later/Call/outer=Builtin/abs SilentWrong # #242 read/ModuleDef/StaticInitializer/Later/Call/outer=Builtin/int SilentWrong # #2423 missing-refusal read/ModuleDef/StaticInitializer/Later/Call/outer=Builtin/len SilentWrong # #2423 missing-refusal read/ModuleDef/StaticInitializer/Later/Call/outer=Builtin/max SilentWrong # #2423 missing-refusal -read/ModuleEnum/DataclassFieldInitializer/Earlier/Bare/outer=None SilentWrong # #2423 missing-refusal -read/ModuleEnum/DataclassFieldInitializer/Later/Bare/outer=None SilentWrong # #2423 missing-refusal -read/ModuleEnum/EnumMemberValue/Earlier/Bare/outer=None SilentWrong # #2423 missing-refusal -read/ModuleEnum/EnumMemberValue/Later/Bare/outer=None SilentWrong # #2423 missing-refusal -read/ModuleEnum/ParameterDefault/Earlier/Bare/outer=None SilentWrong # #2423 missing-refusal -read/ModuleEnum/ParameterDefault/Later/Bare/outer=None SilentWrong # #2423 missing-refusal -read/ModuleEnum/StructFieldInitializer/Earlier/Bare/outer=None SilentWrong # #2423 missing-refusal -read/ModuleEnum/StructFieldInitializer/Later/Bare/outer=None SilentWrong # #2423 missing-refusal read/ModuleProperty/ComprehensionElement/Later/Bare/outer=None Ice # #2423 ice read/ModuleProperty/ComprehensionElement/Later/Call/outer=Builtin/abs Ice # #2423 ice read/ModuleProperty/ComprehensionElement/Later/Call/outer=Builtin/int Ice # #2423 ice @@ -1096,31 +1087,31 @@ read/ModuleVar/StaticMethodBody/Later/Bare/outer=None FalseRefusal # #2423 false read/ModuleVar/StaticPropertyDefault/Later/Bare/outer=None FalseRefusal # #2423 false-refusal read/NestedType/AccessorGetBody/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/AccessorGetBody/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/AccessorGetBody/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/AccessorGetBody/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/AccessorGetBody/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/AccessorGetBody/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/AccessorGetBody/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/AccessorGetBody/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/AccessorSetBody/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/AccessorSetBody/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/AccessorSetBody/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/AccessorSetBody/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/AccessorSetBody/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/AccessorSetBody/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/AccessorSetBody/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/AccessorSetBody/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/ComprehensionElement/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/ComprehensionElement/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/ComprehensionElement/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/ComprehensionElement/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/ComprehensionElement/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/ComprehensionElement/Later/Bare/outer=None Ice # #2397 ice read/NestedType/ComprehensionElement/Later/Qualified/outer=None Ice # #2397 ice -read/NestedType/ComprehensionElement/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/ComprehensionElement/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/ComprehensionIterable/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/ComprehensionIterable/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/ComprehensionIterable/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/ComprehensionIterable/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/ComprehensionIterable/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/ComprehensionIterable/Later/Bare/outer=None Ice # #2397 ice read/NestedType/ComprehensionIterable/Later/Qualified/outer=None Ice # #2397 ice -read/NestedType/ComprehensionIterable/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal -read/NestedType/ConstInitializer/Earlier/Alias/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/ComprehensionIterable/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal +read/NestedType/ConstInitializer/Earlier/Alias/outer=None FalseRefusal # #2397 false-refusal read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleClass SilentWrong # #2423 silent-wrong read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleComputedConst Ice # #2397 ice read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleDef Ice # #2397 ice @@ -1131,7 +1122,7 @@ read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleStruct SilentWrong # # read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleTypeAlias Ice # #2397 ice read/NestedType/ConstInitializer/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/ConstInitializer/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/ConstInitializer/Later/Alias/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/ConstInitializer/Later/Alias/outer=None FalseRefusal # #2397 false-refusal read/NestedType/ConstInitializer/Later/Bare/outer=ModuleClass SilentWrong # #2423 missing-refusal read/NestedType/ConstInitializer/Later/Bare/outer=ModuleComputedConst Ice # #2397 ice read/NestedType/ConstInitializer/Later/Bare/outer=ModuleDef Ice # #2397 ice @@ -1164,21 +1155,21 @@ read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleStruct Sile read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleTypeAlias Ice # #2397 ice read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/DataclassInitFieldInitializer/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/FunctionBody/Earlier/Alias/outer=None FalseRefusal # #2423 false-refusal -read/NestedType/FunctionBody/Later/Alias/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/FunctionBody/Earlier/Alias/outer=None FalseRefusal # #2397 false-refusal +read/NestedType/FunctionBody/Later/Alias/outer=None FalseRefusal # #2397 false-refusal read/NestedType/GeneratorBody/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/GeneratorBody/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/GeneratorBody/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/GeneratorBody/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/GeneratorBody/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/GeneratorBody/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/GeneratorBody/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/GeneratorBody/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/InitBody/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/InitBody/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/InitBody/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/InitBody/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/InitBody/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/InitBody/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/InitBody/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal -read/NestedType/InstanceFieldInitializer/Earlier/Alias/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/InitBody/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal +read/NestedType/InstanceFieldInitializer/Earlier/Alias/outer=None FalseRefusal # #2397 false-refusal read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleClass SilentWrong # #2423 silent-wrong read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleComputedConst Ice # #2397 ice read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleDef Ice # #2397 ice @@ -1189,7 +1180,7 @@ read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleStruct SilentW read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleTypeAlias Ice # #2397 ice read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/InstanceFieldInitializer/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/InstanceFieldInitializer/Later/Alias/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/InstanceFieldInitializer/Later/Alias/outer=None FalseRefusal # #2397 false-refusal read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleClass SilentWrong # #2423 missing-refusal read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleComputedConst Ice # #2397 ice read/NestedType/InstanceFieldInitializer/Later/Bare/outer=ModuleDef Ice # #2397 ice @@ -1222,24 +1213,24 @@ read/NestedType/InstancePropertyDefault/Later/Bare/outer=ModuleVar Ice # #2397 i read/NestedType/InstancePropertyDefault/Later/Bare/outer=None Ice # #2397 ice read/NestedType/LambdaImmediate/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/LambdaImmediate/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/LambdaImmediate/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/LambdaImmediate/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/LambdaImmediate/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/LambdaImmediate/Later/Bare/outer=None Ice # #2397 ice read/NestedType/LambdaImmediate/Later/Qualified/outer=None Ice # #2397 ice -read/NestedType/LambdaImmediate/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/LambdaImmediate/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/LambdaPassed/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/LambdaPassed/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/LambdaPassed/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/LambdaPassed/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/LambdaPassed/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/LambdaPassed/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/LambdaPassed/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/LambdaPassed/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/LambdaStored/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/LambdaStored/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/LambdaStored/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/LambdaStored/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/LambdaStored/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/LambdaStored/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/LambdaStored/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal -read/NestedType/MethodBody/Earlier/Alias/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/LambdaStored/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal +read/NestedType/MethodBody/Earlier/Alias/outer=None FalseRefusal # #2397 false-refusal read/NestedType/MethodBody/Earlier/Bare/outer=ModuleComputedConst Ice # #2397 ice read/NestedType/MethodBody/Earlier/Bare/outer=ModuleDef Ice # #2397 ice read/NestedType/MethodBody/Earlier/Bare/outer=ModuleEnum Ice # #2397 ice @@ -1248,8 +1239,8 @@ read/NestedType/MethodBody/Earlier/Bare/outer=ModuleProperty Ice # #2397 ice read/NestedType/MethodBody/Earlier/Bare/outer=ModuleTypeAlias Ice # #2397 ice read/NestedType/MethodBody/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/MethodBody/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/MethodBody/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal -read/NestedType/MethodBody/Later/Alias/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/MethodBody/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal +read/NestedType/MethodBody/Later/Alias/outer=None FalseRefusal # #2397 false-refusal read/NestedType/MethodBody/Later/Bare/outer=ModuleComputedConst Ice # #2397 ice read/NestedType/MethodBody/Later/Bare/outer=ModuleDef Ice # #2397 ice read/NestedType/MethodBody/Later/Bare/outer=ModuleEnum Ice # #2397 ice @@ -1258,17 +1249,17 @@ read/NestedType/MethodBody/Later/Bare/outer=ModuleProperty Ice # #2397 ice read/NestedType/MethodBody/Later/Bare/outer=ModuleTypeAlias Ice # #2397 ice read/NestedType/MethodBody/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/MethodBody/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/MethodBody/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/MethodBody/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/NestedClassMethodBody/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/NestedClassMethodBody/Earlier/Bare/outer=None Ice # #2397 ice read/NestedType/NestedClassMethodBody/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/NestedClassMethodBody/Later/Bare/outer=None Ice # #2397 ice read/NestedType/NestedDefInMethod/Earlier/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/NestedDefInMethod/Earlier/Bare/outer=None Ice # #2397 ice -read/NestedType/NestedDefInMethod/Earlier/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/NestedDefInMethod/Earlier/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/NestedDefInMethod/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/NestedDefInMethod/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/NestedDefInMethod/Later/SelfDot/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/NestedDefInMethod/Later/SelfDot/outer=None FalseRefusal # #2397 false-refusal read/NestedType/ParameterDefault/Earlier/Bare/outer=ModuleEnum Ice # #2397 ice read/NestedType/ParameterDefault/Later/Bare/outer=ModuleEnum Ice # #2397 ice read/NestedType/StaticInitializer/ComprehensionElement/Earlier/Bare/outer=ModuleDef Ice # #2397 ice @@ -1283,7 +1274,7 @@ read/NestedType/StaticInitializer/ComprehensionIterable/Earlier/Bare/outer=None read/NestedType/StaticInitializer/ComprehensionIterable/Later/Bare/outer=ModuleDef Ice # #2397 ice read/NestedType/StaticInitializer/ComprehensionIterable/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/StaticInitializer/ComprehensionIterable/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/StaticInitializer/Earlier/Alias/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/StaticInitializer/Earlier/Alias/outer=None FalseRefusal # #2397 false-refusal read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleClass SilentWrong # #2423 silent-wrong read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleComputedConst Ice # #2397 ice read/NestedType/StaticInitializer/Earlier/Bare/outer=ModuleDef Ice # #2397 ice @@ -1300,7 +1291,7 @@ read/NestedType/StaticInitializer/Lambda/Earlier/Bare/outer=None Ice # #2397 ice read/NestedType/StaticInitializer/Lambda/Later/Bare/outer=ModuleDef Ice # #2397 ice read/NestedType/StaticInitializer/Lambda/Later/Bare/outer=ModuleVar Ice # #2397 ice read/NestedType/StaticInitializer/Lambda/Later/Bare/outer=None Ice # #2397 ice -read/NestedType/StaticInitializer/Later/Alias/outer=None FalseRefusal # #2423 false-refusal +read/NestedType/StaticInitializer/Later/Alias/outer=None FalseRefusal # #2397 false-refusal read/NestedType/StaticInitializer/Later/Bare/outer=ModuleClass SilentWrong # #2423 missing-refusal read/NestedType/StaticInitializer/Later/Bare/outer=ModuleComputedConst Ice # #2397 ice read/NestedType/StaticInitializer/Later/Bare/outer=ModuleDef Ice # #2397 ice diff --git a/src/Sharpy.Compiler.Tests/Conformance/name-resolution-rules.txt b/src/Sharpy.Compiler.Tests/Conformance/name-resolution-rules.txt new file mode 100644 index 000000000..e6e136f3d --- /dev/null +++ b/src/Sharpy.Compiler.Tests/Conformance/name-resolution-rules.txt @@ -0,0 +1,289 @@ +# The binding and scoping rule table (#2487): what each generated cell of the name-resolution pools must do, and +# under which rule of docs/design/name-resolution.md (N1…N7, S1…S3, the R-xx rulings and the kind refusals). +# +# A row is ` axis=value,… axis!=value,…`: +# - the tag is MustRun, MustRefuse, MustRefuseOrThrow, MayRefuse or Unruled; `*` (the seed row only) leaves it to +# the seed table; +# - constraints on one row all hold; the values of one constraint are alternatives; `-` is an axis the cell does +# not carry; `@Class` is a class of the axis (NameResolutionDifferentialTests.RuleTable.cs builds each from the +# roster or predicate the generator branches on); `mark` holds when the cell's key carries one of the labels. +# - the axes and where each is read from: RuleTableAxes in the same file. +# +# Totality (RuleTable_EveryCellHasOneRow_AndEveryRowACell, and each sweep): every generated cell matches exactly one +# row, that row's tag and rule are the cell's, and every row has a cell in a pool that reads the table. A verdict +# changes here and in the generator together, or the test is red. +# +# The rows of the P77a pool were transcribed from the generator's Expect functions at the stage-0 commit of +# plan-777361 (P78) by splitting the pool on its axes until each part carries one tag and rule, then merging parts +# that differ on one axis. They are edited by hand from here on. + +# --- Read: 126 rows, 6271 cells --- +MustRun A3 family=Read route=- relation=Base target!=@CallForm,InstanceField,InstanceProperty outer=@Module,@TypeLevelMember,@Named position!=@ConstantOnly order!=Earlier +MustRun N1 family=Read route=- relation!=- spelling=Bare target=@TypeLevel outer=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier nesting=- +MustRun N1 family=Read route=- relation!=- spelling=Bare target=@TypeLevel outer=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier nesting=ComprehensionIterable +MustRun N1 family=Read route=- relation!=- spelling=Bare target=ClassLiteralConst outer=None position=@ConstantOnly order=Earlier +MustRun N1 family=Read route=- relation!=Self,Base readForm!=Call target!=@CallForm,@CtorForm,ModuleEnum,InstanceField,InstanceProperty outer=@Module,@TypeLevelMember,@Named position!=@ConstantOnly,ModuleInitializer order!=Earlier +MustRun N1 family=Read route=- relation!=Self,Base readForm=Call target=@NonWritableByMeaning outer=@Module,@TypeLevelMember,@Named position!=@Initializer,ModuleInitializer order!=Earlier +MustRun N1 family=Read route=- relation=- readForm!=Call target!=@ValueForm,InstanceMethod outer=@Module,@TypeLevelMember,@Named position!=@ConstantOnly,ModuleInitializer order!=Earlier mark=arity-match mark!=int +MustRun N1 family=Read route=- relation=- spelling!=Bare target=@NonWritableByMeaning,ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty outer=None position=@Initializer order=Earlier +MustRun N1 family=Read route=- relation=- spelling!=Bare target=@NonWritableByMeaning,ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty outer=None position=ModuleInitializer order=Earlier +MustRun N1 family=Read route=- relation=- spelling=Bare target!=ModuleLet outer=None position!=@ConstantOnly,ComprehensionElement nesting=Lambda +MustRun N1 family=Read route=- relation=- spelling=Bare target!=ModuleLet outer=None position!=@ConstantOnly,ComprehensionElement,EnumMemberValue order=Earlier nesting=- +MustRun N1 family=Read route=- relation=- spelling=Bare target!=ModuleLet outer=None position!=@Initializer,ComprehensionElement,ModuleInitializer,ModulePropertyInitializer,EnumMemberValue order!=Earlier nesting=- +MustRun N1 family=Read route=- relation=- spelling=Bare target=ModuleLiteralConst,ModuleEnum outer=None position=@ConstantOnly order=Earlier +MustRun N1 family=Read route=- relation=- spelling=Bare target=ModuleLiteralConst,ModuleEnum outer=None position=EnumMemberValue order=Earlier nesting=- +MustRun N1 family=Read route=- relation=- target!=ModuleLet outer=None position=ComprehensionElement +MustRun N1 family=Read route=- spelling!=Qualified readForm!=- target=@NonWritableByMeaning outer=@Module,@TypeLevelMember,@Named position!=@Initializer order=Earlier mark!=arity-mismatch +MustRun N1 family=Read route=- spelling!=Qualified readForm=- target=@NonWritableByMeaning outer=@Module,@TypeLevelMember,@Named position!=@Initializer order=Earlier mark!=arity-mismatch,int +MustRun N1 family=Read route=- spelling!=Qualified readForm=-,Call target!=@TypeLevelMember,@NonWritableByMeaning outer=@Module,@TypeLevelMember,@Named position!=@Initializer order=Earlier mark=PrintedValue +MustRun N1 family=Read route=- spelling!=Qualified readForm=Value target!=@TypeLevelMember,@NonWritableByMeaning outer=@Module,@TypeLevelMember,@Named position!=@Initializer order=Earlier +MustRun N1 family=Read route=- spelling!=Qualified target!=@Instance outer=ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty,ModuleUnion,ModuleInterface position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier nesting=-,ComprehensionIterable +MustRun N1 family=Read route=- spelling!=Qualified target!=@ValueForm,InstanceMethod outer=@CallForm position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier nesting=-,ComprehensionIterable +MustRun N1 family=Read route=- spelling!=Qualified target=@CtorForm,ModuleDef,ModuleEnum,LocalDef,LambdaTypedLocal outer=@CtorForm position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier +MustRun N1 family=Read route=- spelling=Bare target=ClassLiteralConst outer=ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty,ModuleUnion,ModuleInterface position=@ConstantOnly order=Earlier +MustRun N1 family=Read route=-,comprehension,result-form,type-position relation=- resultForm=-,Err spelling!=Bare target=@NonWritableByMeaning,ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty outer=None position!=@Initializer,ComprehensionElement,ModuleInitializer +MustRun N1 family=Read route=order-observation relation=- spelling!=Bare target!=@Module,@TypeLevel outer=None position!=ComprehensionElement +MustRun N1+N3 family=Read route=- relation!=- spelling=Bare target=@TypeLevel outer=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Later nesting=- +MustRun N1+N3 family=Read route=- relation!=- spelling=Bare target=@TypeLevel outer=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Later nesting=ComprehensionIterable +MustRun N1+N3 family=Read route=- relation!=- spelling=Bare target=ClassLiteralConst outer=None position=@ConstantOnly order!=-,Earlier +MustRun N1+N3 family=Read route=- relation=Other spelling!=Bare target=@TypeLevel outer=None position!=@ConstantOnly +MustRefuse N1-arity family=Read route=- relation=- readForm!=Call target!=@ValueForm,InstanceMethod outer=@Module,@TypeLevelMember,@Named position!=@ConstantOnly,ModuleInitializer order!=Earlier mark!=arity-match,int +MustRefuse N1-arity family=Read route=- spelling!=Qualified target=@NonWritableByMeaning outer=@Module,@TypeLevelMember,@Named position!=@Initializer order=Earlier mark=arity-mismatch mark!=int +MustRun N1-innermost family=Read route=- relation!=Self target!=@Instance outer=@PositionLocal position!=@ConstantOnly order!=Earlier +MustRun N1-innermost family=Read route=- relation=- spelling=Bare target=@Instance outer!=None position=@Initializer nesting=- +MustRun N1-innermost family=Read route=- relation=- target=@Instance outer!=None position!=@Initializer +MustRun N1-innermost family=Read route=- target!=@Instance,ModuleLet outer=@PositionLocal position!=@ConstantOnly order=Earlier +MustRefuse N1-methods family=Read route=- relation!=- spelling=Bare target!=@TypeLevel outer=None position=@Initializer nesting=ComprehensionElement,Lambda +MustRefuse N1-methods family=Read route=- relation!=- spelling=Bare target=@TypeLevel outer=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier,Later nesting=ComprehensionElement,Lambda +MustRefuse N1-methods family=Read route=-,sibling,struct relation!=- spelling=Bare outer=None position!=@Initializer order!=- +MustRefuse N1-methods family=Read route=sibling relation!=- spelling=Bare target=@TypeLevel outer=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier,Later nesting=- +MustRun N1-nesting family=Read route=- relation=- spelling=Bare target!=ModuleLet outer=None position!=@ConstantOnly,ComprehensionElement nesting!=-,Lambda +MustRun N1-nesting family=Read route=comprehension relation=- target!=ModuleLet outer=None position=ComprehensionElement +MustRefuse N1-type-error family=Read route=- relation!=- target=InstanceMethod outer!=@CallForm,@CtorForm,ModuleEnum,None position!=@Initializer +MustRefuse N1-type-error family=Read route=- relation!=-,Self,Base readForm!=Call target!=@ValueForm,InstanceMethod outer=@Module,@TypeLevelMember,@Named position!=@ConstantOnly,ModuleInitializer order!=Earlier +MustRefuse N1-type-error family=Read route=- relation!=Self,Base readForm=Call target!=@NonWritableByMeaning,@Instance outer=@Module,@TypeLevelMember,@Named position!=@Initializer,ModuleInitializer order!=Earlier +MustRefuse N1-type-error family=Read route=- relation=Base target=ModuleDef,StaticMethod,LocalDef,LambdaTypedLocal outer=@Module,@TypeLevelMember,@Named position!=@ConstantOnly order!=Earlier +MustRefuse N1-type-error family=Read route=- relation=Self spelling=Bare target=@CtorForm,ModuleDef,ModuleEnum,LocalDef,LambdaTypedLocal outer!=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order!=Earlier nesting=ComprehensionElement,Lambda +MustRefuse N1-type-error family=Read route=- relation=Self spelling=Bare target=StaticMethod outer!=@NonWritableByMeaning,None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order!=Earlier nesting=ComprehensionElement,Lambda +MustRefuse N1-type-error family=Read route=- relation=Self target!=@ValueForm,InstanceMethod outer=ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty,ModuleUnion,ModuleInterface position!=@Initializer order!=Earlier +MustRefuse N1-type-error family=Read route=- relation=Self target=@CtorForm,ModuleDef,ModuleEnum,LocalDef,LambdaTypedLocal outer=ModuleDef position!=@Initializer order!=Earlier +MustRefuse N1-type-error family=Read route=- spelling!=Qualified readForm=-,Call target!=@TypeLevelMember,@NonWritableByMeaning outer=@TypeLevelMember,@Named,ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty,ModuleDef position!=@Initializer order=Earlier mark!=PrintedValue +MustRefuse N1-type-error family=Read route=- spelling!=Qualified target!=@CallForm,@CtorForm,ModuleEnum,InstanceField,InstanceProperty outer!=@ValueForm position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier nesting=-,ComprehensionIterable +MustRefuse N1-type-error family=Read route=- spelling!=Qualified target!=@Instance outer!=@Module,@PositionLocal,StaticMethod,InstanceMethod,Builtin,None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier +MustRefuse N1-type-error family=Read route=- spelling!=Qualified target!=@ValueForm,InstanceMethod outer=ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty,ModuleUnion,ModuleInterface position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier nesting=ComprehensionElement,Lambda +MustRefuse N1-type-error family=Read route=- spelling!=Qualified target=@CtorForm,ModuleDef,ModuleEnum,LocalDef,LambdaTypedLocal outer=@CallForm position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier nesting=ComprehensionElement,Lambda +MustRefuse N1-type-error family=Read route=- spelling!=Qualified target=@CtorForm,ModuleDef,ModuleEnum,LocalDef,LambdaTypedLocal outer=ModuleEnum position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier +MustRefuse N1-type-error family=Read route=- spelling!=Qualified target=StaticMethod outer=@CtorForm,ModuleEnum position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier +MustRefuse N1-type-error family=Read route=- spelling!=Qualified target=StaticMethod outer=ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty,ModuleUnion,ModuleInterface position!=@Initializer order=Earlier +MustRefuse N1-type-error family=Read route=- spelling=Bare target=ClassLiteralConst outer!=@Module,StaticMethod,InstanceMethod,Builtin,None position=@ConstantOnly order=Earlier +MustRefuse N1-type-error family=Read route=- spelling=Bare target=InstanceMethod outer!=@NonWritableByMeaning,None position=@Initializer nesting=ComprehensionElement,Lambda +MustRefuse N1-type-error family=Read route=- target=ClassLiteralConst outer!=@ValueForm position=@ConstantOnly order=Earlier +MustRefuse N2 family=Read route=- relation!=Base spelling=Bare target=ClassLiteralConst outer!=None position=@ConstantOnly order!=Earlier +MustRefuse N2 family=Read route=- relation=Self spelling=Bare target!=@Instance outer!=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order!=Earlier nesting=-,ComprehensionIterable +MustRefuse N2-module family=Read route=- relation!=Self,Base readForm=Call target!=@Instance outer=@Module,@TypeLevelMember,@Named position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order!=Earlier +MustRefuse N2-module family=Read route=- relation!=Self,Base target!=@Instance outer=@Module,@TypeLevelMember,@Named position=ModuleInitializer order!=Earlier +MustRun N3 family=Read route=- relation=- spelling!=Bare target=@NonWritableByMeaning,ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty outer=None position=@Initializer order!=Earlier +MustRun N3 family=Read route=- relation=- spelling=Bare target!=ModuleLet outer=None position=ModuleInitializer order=Later nesting=- +MustRun N3 family=Read route=- relation=- spelling=Bare target!=ModuleLet outer=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault,ModulePropertyInitializer order!=Earlier nesting=- +MustRun N3 family=Read route=- relation=- spelling=Bare target=ModuleLiteralConst,ModuleEnum outer=None position=@ConstantOnly order!=Earlier +MustRun N3 family=Read route=- relation=- spelling=Bare target=ModuleLiteralConst,ModuleEnum outer=None position=EnumMemberValue order!=Earlier nesting=- +MustRun N3 family=Read route=-,str relation=- spelling!=Bare target=@NonWritableByMeaning,ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty outer=None position=ModuleInitializer order!=Earlier +MustRun N3 family=Read route=order-observation relation=- spelling!=Bare target=@NonWritableByMeaning,ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty outer=None position!=ComprehensionElement,ModuleInitializer +MustRun N3 family=Read route=order-observation relation=- spelling!=Bare target=@TypeLevel outer=None position!=ComprehensionElement +MustRefuseOrThrow N3-cycle family=Read route=- relation!=- spelling=Bare target=@TypeLevel outer=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Self,Cycle +MustRefuseOrThrow N3-cycle family=Read route=- relation!=-,Other spelling!=Bare target=@TypeLevel outer=None position!=@ConstantOnly order=Self,Cycle +MustRefuseOrThrow N3-cycle family=Read route=- relation=- spelling=Bare target!=ModuleLet outer=None position=ModuleInitializer order=-,Self,Cycle nesting=- +MustRefuseOrThrow N3-cycle family=Read route=- relation=- target=ModuleLet outer=None order=Self,Cycle +MustRefuseOrThrow N3-cycle family=Read route=cycle relation=- outer=None +MustRefuseOrThrow N3-cycle family=Read route=str relation=- spelling!=Bare target=@TypeLevel outer=None position!=ComprehensionElement mark=self +MustRun N7 family=Read route=- relation!=- spelling!=Bare target=ClassLiteralConst outer=None position=@ConstantOnly +MustRun N7 family=Read route=- relation!=- spelling=SelfDot target!=@TypeLevel outer=None +MustRun N7 family=Read route=- relation=Self spelling!=Bare target!=@Instance outer!=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order!=Earlier +MustRun N7 family=Read route=- spelling!=Bare target=ClassLiteralConst outer!=@CallForm,@CtorForm,ModuleEnum,None position=@ConstantOnly order=Earlier +MustRun N7 family=Read route=- spelling!=Bare target=ClassLiteralConst outer!=None position=@ConstantOnly order!=Earlier +MustRun N7 family=Read route=- spelling=Qualified target!=@Instance outer=@Module,@TypeLevelMember,@Named position!=@ConstantOnly order=Earlier +MustRun N7 family=Read route=-,sibling,struct relation!=-,Other spelling!=Bare target=@TypeLevel outer=None position!=@ConstantOnly order=-,Earlier,Later +MustRun N7 family=Read route=-,str relation=- spelling!=Bare target=@TypeLevel outer=None position!=ComprehensionElement mark!=self +MustRun N7 family=Read route=struct relation!=- spelling=SelfDot target!=@TypeLevel outer=None position!=@StructClosureBody nesting=- +MustRun N7 family=Read route=type-position-alias relation=- spelling!=Bare target!=ModuleLet outer=None position!=ComprehensionElement +MustRefuse R-KG family=Read route=- relation!=-,Base spelling=Bare outer=None position!=@Initializer order=- +MustRefuse R-KG family=Read route=- relation!=-,Base spelling=Bare target=@TypeLevel outer=None position=@Initializer order=- +MustRefuse R-KT family=Read route=struct relation!=- spelling=SelfDot target!=@TypeLevel outer=None position!=@StructClosureBody nesting!=- +MustRefuse R-KT family=Read route=struct relation!=- spelling=SelfDot target!=@TypeLevel outer=None position=@StructClosureBody +MustRun R-Y family=Read route=- relation!=- target=InstanceField,InstanceProperty outer!=None position!=@Initializer +MustRun R-Y family=Read route=- relation!=- target=InstanceMethod outer!=@ValueForm position!=@Initializer +MustRun R-Y family=Read route=- relation=Self spelling=Bare target!=@CallForm,@CtorForm,ModuleEnum,InstanceField,InstanceProperty outer!=None position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order!=Earlier nesting=ComprehensionElement,Lambda +MustRun R-Y family=Read route=- relation=Self spelling=Bare target=StaticMethod outer=@NonWritableByMeaning position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order!=Earlier nesting=ComprehensionElement,Lambda +MustRun R-Y family=Read route=- relation=Self target!=@CallForm,@CtorForm,ModuleEnum,InstanceField,InstanceProperty outer!=None position!=@Initializer order!=Earlier +MustRun R-Y family=Read route=- relation=Self target!=@ValueForm,InstanceMethod outer=@PositionLocal,@TypeLevelMember,@CtorForm,@Named,ModuleEnum position!=@Initializer order!=Earlier +MustRun R-Y family=Read route=- relation=Self target=StaticMethod outer=ModuleDef position!=@Initializer order!=Earlier +MustRun R-Y family=Read route=- spelling!=Qualified readForm=-,Call target!=@TypeLevelMember,@NonWritableByMeaning outer=@CtorForm,ModuleEnum,ModuleUnion,ModuleInterface position!=@Initializer order=Earlier mark!=PrintedValue +MustRun R-Y family=Read route=- spelling!=Qualified target!=@CallForm,@CtorForm,ModuleEnum,InstanceField,InstanceProperty outer=@Module,StaticMethod,InstanceMethod,Builtin position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier nesting=ComprehensionElement,Lambda +MustRun R-Y family=Read route=- spelling!=Qualified target=StaticField,StaticProperty,ClassLiteralConst,ClassComputedConst outer=@Module,@TypeLevelMember,@Named position!=@Initializer order=Earlier +MustRun R-Y family=Read route=- spelling!=Qualified target=StaticMethod outer=@CallForm position=StaticInitializer,InstanceFieldInitializer,DataclassInitFieldInitializer,StructInitFieldInitializer,ConstInitializer,StaticPropertyDefault,InstancePropertyDefault order=Earlier nesting=ComprehensionElement,Lambda +MustRun R-Y family=Read route=- spelling!=Qualified target=StaticMethod outer=@TypeLevelMember,@CtorForm,@Named,ModuleDef,ModuleEnum position!=@Initializer order=Earlier +MustRun R-Y family=Read route=- spelling=Bare target=InstanceField,InstanceProperty outer!=None position=@Initializer nesting=ComprehensionElement,Lambda +MustRun R-Y family=Read route=- spelling=Bare target=InstanceMethod outer=@NonWritableByMeaning position=@Initializer nesting=ComprehensionElement,Lambda +MustRefuse R1(b) family=Read route=- relation=Base spelling=Bare outer=None position!=@Initializer order=- +MustRefuse R1(b) family=Read route=- relation=Base spelling=Bare target=@TypeLevel outer=None position=@Initializer order=- +MustRefuse SPY0401 family=Read route=- relation!=- spelling!=Bare target=StaticField,StaticProperty,StaticMethod,ClassComputedConst,NestedType outer=None position=@ConstantOnly +MustRefuse SPY0401 family=Read route=- relation!=- spelling=Bare target=StaticField,StaticProperty,StaticMethod,ClassComputedConst,NestedType outer=None position=@ConstantOnly order!=- +MustRefuse SPY0401 family=Read route=- relation=- spelling=Bare target!=ModuleLet,ModuleLiteralConst,ModuleEnum outer=None position=@ConstantOnly +MustRefuse SPY0401 family=Read route=- relation=Base spelling=Bare target=ClassLiteralConst outer!=None position=@ConstantOnly order!=Earlier +# Among the cells of the next row is a bare sibling read at-or-after its reader under an outer binding, in a constant-only +# position: N2's program. This pool answers it with SPY0401 today. N2's own code, SPY0619, is the one plan-777361 (P78) +# introduces (D3, D9), and the ScopeMeaning rows below already expect it for the same program: the two readings meet at the +# commit that makes the compiler say SPY0619, where this row's N2 cells are retagged (D9, T8). +MustRefuse SPY0401 family=Read route=- target!=@Instance,ClassLiteralConst outer!=None position=@ConstantOnly +MustRefuse kind:SPY0212 family=Read route=- relation=- readForm!=Call target!=@ValueForm,InstanceMethod outer=@Module,@TypeLevelMember,@Named position!=@ConstantOnly,ModuleInitializer order!=Earlier mark=int +MustRefuse kind:SPY0212 family=Read route=- spelling!=Qualified readForm=- target=@NonWritableByMeaning outer=@Module,@TypeLevelMember,@Named position!=@Initializer order=Earlier mark=int mark!=arity-mismatch +MustRefuse kind:SPY0212 family=Read route=- spelling!=Qualified target=@NonWritableByMeaning outer=@Module,@TypeLevelMember,@Named position!=@Initializer order=Earlier mark=arity-mismatch mark=int +MustRefuse kind:SPY0290 family=Read route=- relation=- spelling!=Bare target!=@Module,@TypeLevel outer=None position!=ComprehensionElement +MustRefuse kind:SPY0290 family=Read route=- spelling!=Bare target=@Instance outer!=None position=@Initializer +MustRefuse kind:SPY0290 family=Read route=-,struct relation!=- spelling!=Bare,SelfDot target!=@TypeLevel outer=None +MayRefuse kind:SPY0340 family=Read route=- relation=- target=ModuleLet outer=None order=-,Earlier,Later +MayRefuse kind:SPY0340 family=Read route=- target=ModuleLet outer=@PositionLocal position!=@ConstantOnly order=Earlier +MustRefuse kind:enum-member-constant family=Read route=- relation=- spelling=Bare target!=ModuleLet,ModuleLiteralConst,ModuleEnum outer=None position=EnumMemberValue nesting=- +MustRefuse kind:instance-at-initializer family=Read route=- relation!=- spelling=Bare target!=@TypeLevel outer=None position=@Initializer nesting=-,ComprehensionIterable +MustRefuse kind:instance-at-initializer family=Read route=- relation!=- spelling=Bare target=@Instance outer!=None position=@Initializer nesting=- +MustRefuse kind:instance-at-initializer family=Read route=- spelling=Bare target=@Instance outer!=None position=@Initializer nesting=ComprehensionIterable +MustRefuse kind:result-wrap family=Read route=result-form relation=- resultForm!=-,Err spelling!=Bare target=@NonWritableByMeaning,ModuleVar,ModuleLiteralConst,ModuleComputedConst,ModuleProperty outer=None position!=@Initializer,ComprehensionElement,ModuleInitializer + +# --- Store: 37 rows, 716 cells --- +MustRun #1974 family=Store route=- form=LetOrVar +MustRefuse N5 family=Store route=- form=Augmented target!=@TypeLevelMember,@NonWritableByMeaning outer=None +MustRefuse N5 family=Store route=builtin form!=LetOrVar target!=@TypeLevelMember,@NonWritableByMeaning outer=@Named mark=walrus/call mark!=assign/no-binding,no-decl +MustRefuse N5 family=Store route=builtin form=LetOrVar +MustRefuse N5 family=Store route=walrus-in-comprehension form=-,Assign,Augmented,Walrus target!=@TypeLevelMember,@NonWritableByMeaning outer=None +MustRun N5 family=Store route=- form=-,Assign,Walrus target!=@TypeLevelMember,@NonWritableByMeaning outer=None +MustRun N5 family=Store route=builtin form!=LetOrVar target!=@TypeLevelMember,@NonWritableByMeaning outer=@Named mark=assign/no-binding mark!=no-decl +MustRefuse N6 family=Store route=- form=-,Assign,Augmented,Walrus target=@PositionLocal,ModuleVar,ModuleProperty,NestedType,ImportedName,None outer!=None mark=no-decl +MustRefuse N6 family=Store route=-,builtin form=-,Assign,Augmented,Walrus target!=@TypeLevelMember,@NonWritableByMeaning outer=@Named mark!=Assign/global,Augmented/global,Walrus/global,assign/no-binding,no-decl,walrus/call +MustRefuse N6 family=Store route=lambda-walrus form!=LetOrVar target!=@TypeLevelMember,@NonWritableByMeaning outer!=@Named,None mark!=no-decl +MustRun N6 family=Store route=- form!=LetOrVar target!=@TypeLevelMember,@NonWritableByMeaning,ModuleLiteralConst,ModuleComputedConst,LocalVar outer!=@Named,None mark!=no-decl +MustRun N6 family=Store route=builtin form=-,Assign,Augmented,Walrus target!=@TypeLevelMember,@NonWritableByMeaning outer=@Named mark=Assign/global mark!=assign/no-binding,no-decl,walrus/call +MustRun N6 family=Store route=builtin form=-,Assign,Augmented,Walrus target!=@TypeLevelMember,@NonWritableByMeaning outer=@Named mark=Augmented/global mark!=Assign/global,assign/no-binding,no-decl,walrus/call +MustRun N6 family=Store route=builtin form=-,Assign,Augmented,Walrus target!=@TypeLevelMember,@NonWritableByMeaning outer=@Named mark=Walrus/global mark!=Assign/global,Augmented/global,assign/no-binding,no-decl,walrus/call +MustRefuse N6-declaration family=Store route=declaration form!=LetOrVar declaration!=GlobalCreatesBinding target!=@TypeLevelMember,@NonWritableByMeaning outer=None +MustRefuse N6-declaration family=Store route=declaration form!=LetOrVar target!=@TypeLevelMember,@NonWritableByMeaning outer!=@Named,None mark!=no-decl +MustRefuse N6-declaration family=Store route=declaration form=LetOrVar +MustRun N6-same-function family=Store route=- form!=LetOrVar target=LocalVar outer!=@Named,None mark!=no-decl +MustRefuse N6-type-kind family=Store route=- form=-,Assign,Augmented,Walrus target=@NonWritableByMeaning +MustRun N7 family=Store route=attribute form!=LetOrVar receiver=-,SelfDot,InstanceLocal target=InstanceField,InstanceProperty shape!=MemberAccess,TupleLiteral +MustRun N7 family=Store route=attribute form!=LetOrVar receiver=TypeName,Alias target=StaticField,StaticProperty shape!=MemberAccess +MustRun N7 family=Store route=attribute form!=LetOrVar target=StaticField,StaticProperty,ClassLiteralConst,ClassComputedConst,InstanceField,InstanceProperty shape=MemberAccess +MustRun R-BM family=Store route=- form=OutLet target!=@TypeLevelMember,@NonWritableByMeaning outer!=None mark=no-decl +MustRun R-BM family=Store route=- form=OutLet target!=@TypeLevelMember,@NonWritableByMeaning outer=@Named mark!=assign/no-binding,no-decl,walrus/call +MustRun R-BM family=Store route=- form=OutLet target!=@TypeLevelMember,@NonWritableByMeaning outer=None +MustRun R-BM family=Store route=- form=OutLet target=@NonWritableByMeaning +MustRun R-BM family=Store route=- form=OutLet target=@TypeLevelMember +MustRefuse R-KU family=Store route=attribute form!=LetOrVar receiver!=TypeName,Alias target=StaticField,StaticProperty shape!=MemberAccess +MustRefuse S2-walrus family=Store route=walrus-in-comprehension form!=LetOrVar target!=@TypeLevelMember,@NonWritableByMeaning outer!=None mark!=no-decl +MustRefuse SPY0606 family=Store route=- form=-,Assign,Augmented,Walrus target=@TypeLevelMember +MustRefuse kind:SPY0225 family=Store route=- form!=LetOrVar target=ModuleLiteralConst,ModuleComputedConst outer!=@Named,None mark!=no-decl +MustRefuse kind:SPY0225 family=Store route=- form=-,Assign,Augmented,Walrus target=ModuleLet,ModuleLiteralConst,ModuleComputedConst outer!=None mark=no-decl +MustRefuse kind:SPY0225 family=Store route=attribute form!=LetOrVar target=ClassLiteralConst,ClassComputedConst shape!=MemberAccess +MustRefuse kind:SPY0225 family=Store route=attribute form!=LetOrVar target=InstanceField,InstanceProperty shape=TupleLiteral +MustRefuse kind:SPY0290 family=Store route=attribute form!=LetOrVar receiver=TypeName,Alias,DerivedType target=InstanceField,InstanceProperty shape!=MemberAccess,TupleLiteral +MustRefuse kind:SPY0606 family=Store route=attribute form!=LetOrVar target=StaticMethod,InstanceMethod +Unruled unruled:global-creates-binding family=Store route=declaration form!=LetOrVar declaration=GlobalCreatesBinding target!=@TypeLevelMember,@NonWritableByMeaning outer=None + +# --- Local: 21 rows, 1346 cells --- +MustRun #1974 family=Local route=let-in construct=- outer=LocalVar deviation!=- +MustRun N1 family=Local route=-,comprehension-target,lambda-comprehension,timing construct=Comprehension outer!=None +MustRun N1 family=Local route=lambda-comprehension construct=Comprehension outer=None +MustRun N1-innermost family=Local route=- construct=- deviation=- mark!=above,self +MustRefuse N5 family=Local route=- construct=- target!=@CallForm outer=@TypeLevel,None deviation=- mark=above +MustRefuse N5 family=Local route=-,comprehension-target,timing construct=Comprehension outer=None +MustRefuse N5 family=Local route=-,timing construct!=-,Comprehension,OutLet outer=None mark!=inside +MustRefuse N5 family=Local route=let-in construct=- outer=None deviation!=- +MustRefuse N5 family=Local route=timing construct=OutLet outer=None mark!=inside +MustRun N5 family=Local route=- construct!=-,Comprehension mark=inside +MustRun N5 family=Local route=- construct=- target!=LambdaTypedLocal deviation=- mark=self mark!=above +MustRun N5 family=Local route=closure-in-comprehension,closure-in-loop,closure-in-loop-body construct=- outer=None deviation!=- +MustRun N5-block-scope family=Local route=let-in construct=- outer!=LocalVar,None deviation!=- +MustRefuse N5-declared-later family=Local route=- construct=- target!=LocalDef outer!=@TypeLevel,None deviation=- mark=above +MustRefuse N5-declared-later family=Local route=- construct=- target=ModuleDef,StaticMethod,InstanceMethod,LambdaTypedLocal outer=@TypeLevel,None deviation=- mark=above +MustRefuse N5-declared-later family=Local route=L28,timing construct=- deviation=- mark!=above +MustRefuse N5-self family=Local route=- construct=- target=LambdaTypedLocal deviation=- mark=self mark!=above +MustRun R-BM family=Local route=- construct=OutLet mark!=inside +MustRefuse S2 family=Local route=-,timing construct!=-,Comprehension,OutLet outer!=None mark!=inside +MustRefuse S2 family=Local route=timing construct=OutLet outer!=None mark!=inside +MustRefuse S3 family=Local route=- construct=- target=LocalDef deviation=- mark=above + +# --- TypeMember: 1 rows, 450 cells --- +MustRun P52 family=TypeMember route=class,dataclass,enum,interface,struct,union + +# --- Seed: 1 rows, 168 cells --- +* seed family=Seed route=- + +# --- ScopeMeaningDifferentialTests: the cells the P77a pool has no program for (hand-written; the test reads its +# --- verdicts from these rows and carries none). A constant position's verdict is its reader's: the table the reader +# --- passes (`admission`, the validator's AdmissionTable; `-` is the enum member's value, which has no table), and the +# --- host (`mark`) where one table has two readers. Handed a constant, every position runs. Handed a non-constant: a +# --- `const` initializer is then a computed constant (N4), a struct's auto-property keeps its initializer (#1938), an +# --- attribute argument refuses under its own code, and every other position refuses under SPY0401. A name that is no +# --- value there refuses under its kind's own code. An alias that reaches itself is unruled (#2769): unused, it runs. --- +# R-QI's refusal carries SPY0620, a code plan-777361 (P78) introduces (D7, D9): no compiler says it today, so these cells name +# it and wait on it; a refusal under any other code is another rule's. +MustRefuse R-QI family=Read route=no-initializer initializer=Absent target=ModuleVar,ModuleProperty,StaticField,StaticProperty +MustRun N1 family=Read route=no-initializer initializer=Absent target=InstanceField,InstanceProperty,LocalVar +MustRun N1 family=Read route=no-initializer initializer=Present,AccessorBodies +MustRefuse N1-typed-read family=Read route=typed-read +MustRun N1-innermost family=Local route=callee +MustRun N4 family=Read route=constant-kind constantKind=ClrLiteralField,ClrTypeLiteralField,ClrTypeEnumMember,IntEnumMember,IntEnumValue,ComparisonChain +# A `const decimal` of a referenced type (the owner's ruling 17): what C# reads as a constant wherever a decimal can be one, +# which an attribute argument is not. +MustRun N4 family=Read route=constant-kind admission!=DecoratorArgument constantKind=ClrTypeDecimalConstant +# An overloaded method group of a referenced type (`Math.abs`) is in the rows below by the owner's ruling 29 (#2423 comment +# 7052893050): a function target type selects a CLR overload, so where the slot has one the read is a function value like any +# other. It must run at a `const` and a struct's auto-property (refused today under SPY0336: known-red, #2277) and is no +# constant at a default (SPY0401, or today's SPY0336). An attribute argument has no function type at its slot: the last row. +MustRun N4 family=Read route=constant-kind admission=ConstInitializer constantKind=StdlibModuleVariable,ClrStaticMember,ModuleFunction,ModuleFunctionGroup,ClrTypeStaticField,ClrTypeStaticProperty,ClrTypeMethod,ClrTypeDeclinedMethod,ClrTypeMethodGroup,IntEnumName,StringEnumMember,StringEnumValue,StringEnumName,ChainWithNonConstantLink +MustRun #1938 family=Read route=constant-kind mark=struct-auto-property constantKind=StdlibModuleVariable,ClrStaticMember,ModuleFunction,ModuleFunctionGroup,ClrTypeStaticField,ClrTypeStaticProperty,ClrTypeMethod,ClrTypeDeclinedMethod,ClrTypeMethodGroup,IntEnumName,StringEnumMember,StringEnumValue,StringEnumName,ChainWithNonConstantLink +# A string enum's member, its `.value` and any enum's `.name` are refused at a default by the owner's ruling 10 (#2423 comment +# 7045166298), kept as an INTERIM by item 28 (comment 7052893050): it contradicts +# docs/language_specification/function_default_parameters.md, whose allowed defaults list `HttpMethod.GET` (a string enum's +# member), until #2772 makes the default run as the spec says. The spec's text is not changed. +MustRefuse SPY0401 family=Read route=constant-kind admission=ParameterDefault,LambdaParameterDefault,PerInstanceFieldDefault,- mark=def,lambda,dataclass,struct,enum-member constantKind=StdlibModuleVariable,ClrStaticMember,ModuleFunction,ModuleFunctionGroup,ClrTypeStaticField,ClrTypeStaticProperty,ClrTypeMethod,ClrTypeDeclinedMethod,ClrTypeMethodGroup,IntEnumName,StringEnumMember,StringEnumValue,StringEnumName,ChainWithNonConstantLink +MustRefuse SPY0425 family=Read route=constant-kind admission=DecoratorArgument constantKind=StdlibModuleVariable,ClrStaticMember,ModuleFunction,ModuleFunctionGroup,ClrTypeDecimalConstant,ClrTypeStaticField,ClrTypeStaticProperty,ClrTypeMethod,ClrTypeDeclinedMethod,IntEnumName,StringEnumMember,StringEnumValue,StringEnumName,ChainWithNonConstantLink +MustRefuse kind:SPY0336 family=Read route=constant-kind admission=DecoratorArgument constantKind=ClrTypeMethodGroup +# A name of the program's own, under every spelling and from every placement but a bare sibling read: one answer (N7). +MustRun N4 family=Read route=constant-kind constantKind=OwnMember target=ModuleLiteralConst,ClassLiteralConst mark!=bare-sibling +MustRun N4 family=Read route=constant-kind admission=ConstInitializer constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark!=bare-sibling +MustRun #1938 family=Read route=constant-kind mark=struct-auto-property constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark!=bare-sibling +MustRefuse SPY0401 family=Read route=constant-kind admission=ParameterDefault,LambdaParameterDefault,PerInstanceFieldDefault,- mark=def,lambda,dataclass,struct,enum-member constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark!=bare-sibling +MustRefuse SPY0425 family=Read route=constant-kind admission=DecoratorArgument constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark!=bare-sibling +MustRefuse kind:SPY0290 family=Read route=constant-kind constantKind=OwnMember target=InstanceField,InstanceProperty,InstanceMethod spelling!=SelfDot +MustRun N4 family=Read route=constant-kind admission=ConstInitializer constantKind=OwnMember target=InstanceField,InstanceProperty,InstanceMethod spelling=SelfDot +MustRefuse SPY0401 family=Read route=constant-kind admission=LambdaParameterDefault constantKind=OwnMember target=InstanceField,InstanceProperty,InstanceMethod spelling=SelfDot +# A bare read of a sibling in the member's own type is the class-body rule's first (D3): in a method's body the member is not +# visible (N1) and the read is the module's binding (R-Y); at the type body's level it is the member, earlier or with no module +# binding of the name, and N2's refusal at-or-after under one. Where it is the member, the constant position then answers. +MustRefuse N1-methods family=Read route=constant-kind constantKind=OwnMember mark=bare-sibling mark=in-method outer=None +MustRun R-Y family=Read route=constant-kind constantKind=OwnMember mark=bare-sibling mark=in-method outer!=None +# N2's refusal is SPY0619, the code plan-777361 (P78) introduces (D3, D9): no compiler says it today, so the next row's cells +# name it and wait on it by design. The P77a pool's row for the same program (above, `MustRefuse SPY0401 … position=@ConstantOnly`) +# is green on SPY0401 until then. +MustRefuse N2 family=Read route=constant-kind constantKind=OwnMember mark=bare-sibling mark!=in-method order=Later outer!=None +MustRun N1 family=Read route=constant-kind constantKind=OwnMember target=ModuleLiteralConst,ClassLiteralConst mark=bare-sibling mark!=in-method order=Earlier +MustRun N4 family=Read route=constant-kind admission=ConstInitializer constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark=bare-sibling mark!=in-method order=Earlier +MustRun #1938 family=Read route=constant-kind mark=struct-auto-property constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark=bare-sibling mark!=in-method order=Earlier +MustRefuse SPY0401 family=Read route=constant-kind admission=ParameterDefault,LambdaParameterDefault,PerInstanceFieldDefault,- mark=def,lambda,dataclass,struct,enum-member constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark=bare-sibling mark!=in-method order=Earlier +MustRefuse SPY0425 family=Read route=constant-kind admission=DecoratorArgument constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark=bare-sibling mark!=in-method order=Earlier +MustRun N1+N3 family=Read route=constant-kind constantKind=OwnMember target=ModuleLiteralConst,ClassLiteralConst mark=bare-sibling mark!=in-method order=Later outer=None +MustRun N4 family=Read route=constant-kind admission=ConstInitializer constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark=bare-sibling mark!=in-method order=Later outer=None +MustRun #1938 family=Read route=constant-kind mark=struct-auto-property constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark=bare-sibling mark!=in-method order=Later outer=None +MustRefuse SPY0401 family=Read route=constant-kind admission=ParameterDefault,LambdaParameterDefault,PerInstanceFieldDefault,- mark=def,lambda,dataclass,struct,enum-member constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark=bare-sibling mark!=in-method order=Later outer=None +MustRefuse SPY0425 family=Read route=constant-kind admission=DecoratorArgument constantKind=OwnMember target=ModuleVar,ModuleComputedConst,ModuleProperty,ModuleDef,StaticField,StaticProperty,StaticMethod,ClassComputedConst,Builtin mark=bare-sibling mark!=in-method order=Later outer=None +MustRun N1 family=Read route=init-overload +# A parameter default at a type body's level is evaluated in the type body, a lambda's as a `def`'s (D4; the owner's ruling 19): +# a bare name in it is a sibling read, which the class-body rule decides (D3). `order=-` is a slot's control, a literal default. +MustRun N4 family=Read route=lambda-default order=- +MustRun N1 family=Read route=lambda-default order=Earlier +MustRun N1+N3 family=Read route=lambda-default order=Later outer=None +# SPY0619 here too: the code lands with plan-777361 (D9). +MustRefuse N2 family=Read route=lambda-default order=Later outer!=None +MustRefuse N1-alias-target family=Read route=alias-target aliasTarget=Missing +MustRun N1 family=Read route=alias-target aliasTarget=Declared +MustRun #2769 family=Read route=alias-target aliasTarget=Itself diff --git a/src/Sharpy.Compiler.Tests/Conformance/scope-meaning-differential-allowlist.txt b/src/Sharpy.Compiler.Tests/Conformance/scope-meaning-differential-allowlist.txt new file mode 100644 index 000000000..b562b696b --- /dev/null +++ b/src/Sharpy.Compiler.Tests/Conformance/scope-meaning-differential-allowlist.txt @@ -0,0 +1,1623 @@ +# Known-red cells of ScopeMeaningDifferentialTests (stage 0 of plan-777361, P78; verification contract §11). +# ` # # `: the issue is the one whose fix turns the +# cell green, by the cell's class (ScopeMeaningDifferentialTests.ProposedCite): its route's issue, except a typed read +# that is red at the EARLIER order too, which no order cures and is #2417's with its later twin; an alias whose +# target reaches the alias itself, which is #2769's; and, in a constant position, N2's refusal and a bare sibling read +# that is red BELOW its member alone, which are the class-body rule's (#2423), and a member read through `self` that +# dies of CS0176, which is #2147's; and a method group of a referenced type that must run, because a function type stands at +# its slot (the owner's ruling 29, #2423 comment 7052893050), and is refused as a group (SPY0336), which is #2277's. +# A row whose cell passes fails the test until it is deleted. +# `wrong-code` is a must-refuse cell refused under a code its cell does not admit. The sweep writes the rows it would +# list to .claude/tmp/scope-meaning-differential-proposed-allowlist.txt. +local/callee/Comprehension/outer=ImportedName Ice # #2423 ice +local/callee/Comprehension/outer=ModuleClass Ice # #2423 ice +local/callee/Comprehension/outer=ModuleComputedConst Ice # #2423 ice +local/callee/Comprehension/outer=ModuleDef SilentWrong # #2423 silent-wrong +local/callee/Comprehension/outer=ModuleEnum Ice # #2423 ice +local/callee/Comprehension/outer=ModuleLiteralConst Ice # #2423 ice +local/callee/Comprehension/outer=ModuleProperty Ice # #2423 ice +local/callee/Comprehension/outer=ModuleStruct Ice # #2423 ice +local/callee/Comprehension/outer=ModuleUnion Ice # #2423 ice +local/callee/Comprehension/outer=ModuleVar Ice # #2423 ice +local/callee/For/outer=ImportedName Ice # #2423 ice +local/callee/For/outer=ModuleClass SilentWrong # #2423 silent-wrong +local/callee/For/outer=ModuleComputedConst Ice # #2423 ice +local/callee/For/outer=ModuleDef SilentWrong # #2423 silent-wrong +local/callee/For/outer=ModuleEnum Ice # #2423 ice +local/callee/For/outer=ModuleLiteralConst Ice # #2423 ice +local/callee/For/outer=ModuleProperty Ice # #2423 ice +local/callee/For/outer=ModuleStruct SilentWrong # #2423 silent-wrong +local/callee/For/outer=ModuleUnion Ice # #2423 ice +local/callee/For/outer=ModuleVar Ice # #2423 ice +local/callee/Parameter/outer=ImportedName Ice # #2423 ice +local/callee/Parameter/outer=ModuleClass Ice # #2423 ice +local/callee/Parameter/outer=ModuleComputedConst Ice # #2423 ice +local/callee/Parameter/outer=ModuleDef SilentWrong # #2423 silent-wrong +local/callee/Parameter/outer=ModuleEnum Ice # #2423 ice +local/callee/Parameter/outer=ModuleLiteralConst Ice # #2423 ice +local/callee/Parameter/outer=ModuleProperty Ice # #2423 ice +local/callee/Parameter/outer=ModuleStruct Ice # #2423 ice +local/callee/Parameter/outer=ModuleUnion Ice # #2423 ice +local/callee/Parameter/outer=ModuleVar Ice # #2423 ice +local/callee/WithAs/outer=ImportedName Ice # #2423 ice +local/callee/WithAs/outer=ModuleClass SilentWrong # #2423 silent-wrong +local/callee/WithAs/outer=ModuleComputedConst Ice # #2423 ice +local/callee/WithAs/outer=ModuleDef SilentWrong # #2423 silent-wrong +local/callee/WithAs/outer=ModuleEnum Ice # #2423 ice +local/callee/WithAs/outer=ModuleLiteralConst Ice # #2423 ice +local/callee/WithAs/outer=ModuleProperty Ice # #2423 ice +local/callee/WithAs/outer=ModuleStruct SilentWrong # #2423 silent-wrong +local/callee/WithAs/outer=ModuleUnion Ice # #2423 ice +local/callee/WithAs/outer=ModuleVar Ice # #2423 ice +read/alias-target/Missing/Unused/Earlier/block/callable-parameter SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/block/callable-return SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/block/dotted SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/block/generic-alias SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/block/name SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/block/nullable SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/block/optional SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/block/result-error SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/block/tuple-element SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/block/type-argument SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/callable-parameter SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/callable-return SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/dotted SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/generic-alias SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/name SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/nullable SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/optional SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/result-error SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/tuple-element SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/class/type-argument SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/callable-parameter SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/callable-return SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/dotted SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/generic-alias SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/name SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/nullable SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/optional SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/result-error SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/tuple-element SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/function/type-argument SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/callable-parameter SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/callable-return SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/dotted SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/generic-alias SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/name SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/nullable SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/optional SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/result-error SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/tuple-element SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/interface/type-argument SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/callable-parameter SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/callable-return SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/dotted SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/generic-alias SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/name SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/nullable SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/optional SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/result-error SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/tuple-element SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/method/type-argument SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/callable-parameter SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/callable-return SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/dotted SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/generic-alias SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/name SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/nullable SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/optional SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/result-error SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/tuple-element SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/module/type-argument SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/callable-parameter SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/callable-return SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/dotted SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/generic-alias SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/name SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/nullable SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/optional SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/result-error SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/tuple-element SilentWrong # #2423 missing-refusal +read/alias-target/Missing/Unused/Earlier/struct/type-argument SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/block-const/ClrTypeMethodGroup/Value/Math.abs/from-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/block-const/ClrTypeMethodGroup/Value/Math.abs/from-import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/block-const/ClrTypeMethodGroup/Value/Math.abs/import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/block-const/ClrTypeMethodGroup/Value/Math.abs/import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/block-const/ClrTypeMethodGroup/Value/Math.abs/star-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/block-const/ClrTypeMethodGroup/Value/Math.abs/type-alias FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/OwnMember/ClassComputedConst/Annotated/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/block-const/OwnMember/ClassComputedConst/Inferred/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/block-const/OwnMember/ClassLiteralConst/Annotated/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/block-const/OwnMember/ClassLiteralConst/Inferred/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/block-const/OwnMember/StaticMethod/Annotated/SelfDot/Self/Value/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/block-const/OwnMember/StaticProperty/Annotated/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/block-const/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/block-const/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeMethodGroup/Value/Math.abs/from-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/class-const/ClrTypeMethodGroup/Value/Math.abs/from-import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/class-const/ClrTypeMethodGroup/Value/Math.abs/import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/class-const/ClrTypeMethodGroup/Value/Math.abs/import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/class-const/ClrTypeMethodGroup/Value/Math.abs/star-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/class-const/ClrTypeMethodGroup/Value/Math.abs/type-alias FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/OwnMember/ClassComputedConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ConstInitializer/class-const/OwnMember/ClassComputedConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ConstInitializer/class-const/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/class-const/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticField/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticField/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticField/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticField/Inferred/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticField/Inferred/Bare/Self/Later/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticField/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticMethod/Annotated/Bare/Self/Later/Value/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticMethod/Annotated/Bare/Self/Later/outer=ModuleDef/Value/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticProperty/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticProperty/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ConstInitializer/class-const/OwnMember/StaticProperty/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/class-const/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/class-const/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeMethodGroup/Value/Math.abs/from-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/interface-const/ClrTypeMethodGroup/Value/Math.abs/from-import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/interface-const/ClrTypeMethodGroup/Value/Math.abs/import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/interface-const/ClrTypeMethodGroup/Value/Math.abs/import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/interface-const/ClrTypeMethodGroup/Value/Math.abs/star-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/interface-const/ClrTypeMethodGroup/Value/Math.abs/type-alias FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/OwnMember/ClassComputedConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ConstInitializer/interface-const/OwnMember/ClassComputedConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ConstInitializer/interface-const/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/interface-const/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/interface-const/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/interface-const/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeMethodGroup/Value/Math.abs/from-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/local-const/ClrTypeMethodGroup/Value/Math.abs/from-import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/local-const/ClrTypeMethodGroup/Value/Math.abs/import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/local-const/ClrTypeMethodGroup/Value/Math.abs/import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/local-const/ClrTypeMethodGroup/Value/Math.abs/star-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/local-const/ClrTypeMethodGroup/Value/Math.abs/type-alias FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/OwnMember/ClassComputedConst/Annotated/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/local-const/OwnMember/ClassComputedConst/Inferred/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/local-const/OwnMember/ClassLiteralConst/Annotated/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/local-const/OwnMember/ClassLiteralConst/Inferred/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/local-const/OwnMember/StaticMethod/Annotated/SelfDot/Self/Value/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/local-const/OwnMember/StaticProperty/Annotated/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/ConstInitializer/local-const/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/local-const/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeMethodGroup/Value/Math.abs/from-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/module-const/ClrTypeMethodGroup/Value/Math.abs/from-import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/module-const/ClrTypeMethodGroup/Value/Math.abs/import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/module-const/ClrTypeMethodGroup/Value/Math.abs/import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/module-const/ClrTypeMethodGroup/Value/Math.abs/star-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/module-const/ClrTypeMethodGroup/Value/Math.abs/type-alias FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/module-const/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeMethodGroup/Value/Math.abs/from-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/struct-const/ClrTypeMethodGroup/Value/Math.abs/from-import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/struct-const/ClrTypeMethodGroup/Value/Math.abs/import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/struct-const/ClrTypeMethodGroup/Value/Math.abs/import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/struct-const/ClrTypeMethodGroup/Value/Math.abs/star-import FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/struct-const/ClrTypeMethodGroup/Value/Math.abs/type-alias FalseRefusal # #2277 false-refusal +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/OwnMember/ClassComputedConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ConstInitializer/struct-const/OwnMember/ClassComputedConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ConstInitializer/struct-const/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/struct-const/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticField/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticField/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticField/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticField/Inferred/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticField/Inferred/Bare/Self/Later/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticField/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticMethod/Annotated/Bare/Self/Later/Value/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticMethod/Annotated/Bare/Self/Later/outer=ModuleDef/Value/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticProperty/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticProperty/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ConstInitializer/struct-const/OwnMember/StaticProperty/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ConstInitializer/struct-const/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/ConstInitializer/struct-const/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrLiteralField/subprocess.PIPE/from-import FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/ClrLiteralField/subprocess.PIPE/from-import-as FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/ClrLiteralField/subprocess.PIPE/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrLiteralField/subprocess.PIPE/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrLiteralField/subprocess.PIPE/star-import FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/ClrStaticMember/sys.maxsize/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrStaticMember/sys.maxsize/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDecimalConstant/Decimal.one/builtin-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDecimalConstant/Decimal.one/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDecimalConstant/Decimal.one/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDecimalConstant/Decimal.one/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDecimalConstant/Decimal.one/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDecimalConstant/Decimal.one/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDecimalConstant/Decimal.one/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeEnumMember/DayOfWeek.Monday/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeEnumMember/DayOfWeek.Monday/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeEnumMember/DayOfWeek.Monday/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeEnumMember/DayOfWeek.Monday/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeLiteralField/Int32.max_value/builtin-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeLiteralField/Int32.max_value/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeLiteralField/Int32.max_value/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeLiteralField/Int32.max_value/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeLiteralField/Int32.max_value/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeLiteralField/Math.PI/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeLiteralField/Math.PI/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeLiteralField/Math.PI/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeLiteralField/Math.PI/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethod/Value/Math.sqrt/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethod/Value/Math.sqrt/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethod/Value/Math.sqrt/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethod/Value/Math.sqrt/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethod/Value/Math.sqrt/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethod/Value/Math.sqrt/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethodGroup/Value/Math.abs/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethodGroup/Value/Math.abs/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethodGroup/Value/Math.abs/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethodGroup/Value/Math.abs/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethodGroup/Value/Math.abs/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeMethodGroup/Value/Math.abs/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticProperty/Array.max_length/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticProperty/Array.max_length/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticProperty/Array.max_length/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticProperty/Array.max_length/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticProperty/Array.max_length/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ClrTypeStaticProperty/Array.max_length/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ComparisonChain/ordered FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/IntEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/IntEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ModuleFunction/Value/math.sqrt/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ModuleFunction/Value/math.sqrt/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ModuleFunctionGroup/Value/math.log/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/ModuleFunctionGroup/Value/math.log/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Inferred/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Inferred/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Inferred/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Inferred/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassComputedConst/Inferred/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Earlier/bare-sibling FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Inferred/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Inferred/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Earlier/bare-sibling FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/bare-sibling FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceField/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceField/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceField/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceField/Inferred/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceField/Inferred/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceField/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceMethod/Annotated/Alias/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceMethod/Annotated/Qualified/Base/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceMethod/Annotated/Qualified/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/InstanceProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ModuleLiteralConst/Annotated/Bare Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/ModuleLiteralConst/Inferred/Bare Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Inferred/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Inferred/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Inferred/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Inferred/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticField/Inferred/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticMethod/Annotated/Alias/Self/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticMethod/Annotated/Alias/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticMethod/Annotated/Bare/Self/Later/outer=ModuleDef/Value/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticMethod/Annotated/Qualified/Base/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticMethod/Annotated/Qualified/Self/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticMethod/Annotated/Qualified/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticProperty/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticProperty/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticProperty/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/OwnMember/StaticProperty/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StdlibModuleVariable/socket.AF_INET/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StdlibModuleVariable/socket.AF_INET/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute-keyword/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrLiteralField/subprocess.PIPE/from-import FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute/ClrLiteralField/subprocess.PIPE/from-import-as FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute/ClrLiteralField/subprocess.PIPE/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrLiteralField/subprocess.PIPE/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrLiteralField/subprocess.PIPE/star-import FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute/ClrStaticMember/sys.maxsize/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrStaticMember/sys.maxsize/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDecimalConstant/Decimal.one/builtin-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDecimalConstant/Decimal.one/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDecimalConstant/Decimal.one/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDecimalConstant/Decimal.one/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDecimalConstant/Decimal.one/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDecimalConstant/Decimal.one/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDecimalConstant/Decimal.one/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeEnumMember/DayOfWeek.Monday/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeEnumMember/DayOfWeek.Monday/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeEnumMember/DayOfWeek.Monday/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeEnumMember/DayOfWeek.Monday/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeLiteralField/Int32.max_value/builtin-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeLiteralField/Int32.max_value/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeLiteralField/Int32.max_value/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeLiteralField/Int32.max_value/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeLiteralField/Int32.max_value/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeLiteralField/Math.PI/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeLiteralField/Math.PI/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeLiteralField/Math.PI/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeLiteralField/Math.PI/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethod/Value/Math.sqrt/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethod/Value/Math.sqrt/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethod/Value/Math.sqrt/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethod/Value/Math.sqrt/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethod/Value/Math.sqrt/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethod/Value/Math.sqrt/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethodGroup/Value/Math.abs/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethodGroup/Value/Math.abs/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethodGroup/Value/Math.abs/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethodGroup/Value/Math.abs/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethodGroup/Value/Math.abs/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeMethodGroup/Value/Math.abs/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticProperty/Array.max_length/from-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticProperty/Array.max_length/from-import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticProperty/Array.max_length/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticProperty/Array.max_length/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticProperty/Array.max_length/star-import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ClrTypeStaticProperty/Array.max_length/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ComparisonChain/ordered FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute/IntEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/IntEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ModuleFunction/Value/math.sqrt/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ModuleFunction/Value/math.sqrt/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ModuleFunctionGroup/Value/math.log/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/ModuleFunctionGroup/Value/math.log/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Inferred/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Inferred/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Inferred/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Inferred/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassComputedConst/Inferred/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Earlier/bare-sibling FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Inferred/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Inferred/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Earlier/bare-sibling FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/bare-sibling FalseRefusal # #2432 false-refusal +read/constant-kind/DecoratorArgument/attribute/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceField/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceField/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceField/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceField/Inferred/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceField/Inferred/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceField/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceMethod/Annotated/Alias/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceMethod/Annotated/Qualified/Base/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceMethod/Annotated/Qualified/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/InstanceProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ModuleLiteralConst/Annotated/Bare Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/ModuleLiteralConst/Inferred/Bare Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Inferred/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Inferred/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Inferred/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Inferred/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticField/Inferred/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticMethod/Annotated/Alias/Self/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticMethod/Annotated/Alias/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticMethod/Annotated/Bare/Self/Later/outer=ModuleDef/Value/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticMethod/Annotated/Qualified/Base/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticMethod/Annotated/Qualified/Self/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticMethod/Annotated/Qualified/Value Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticProperty/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticProperty/Annotated/Bare/Self/Earlier/outer=ModuleLiteralConst/bare-sibling Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticProperty/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling Ice # #2423 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/OwnMember/StaticProperty/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StdlibModuleVariable/socket.AF_INET/import Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StdlibModuleVariable/socket.AF_INET/import-as Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/DecoratorArgument/attribute/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrLiteralField/subprocess.PIPE/from-import FalseRefusal # #2432 false-refusal +read/constant-kind/LambdaParameterDefault/lambda/ClrLiteralField/subprocess.PIPE/from-import-as FalseRefusal # #2432 false-refusal +read/constant-kind/LambdaParameterDefault/lambda/ClrLiteralField/subprocess.PIPE/star-import FalseRefusal # #2432 false-refusal +read/constant-kind/LambdaParameterDefault/lambda/ClrStaticMember/sys.maxsize/import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrStaticMember/sys.maxsize/import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/star-import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/type-alias Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticProperty/Array.max_length/from-import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticProperty/Array.max_length/from-import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticProperty/Array.max_length/import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticProperty/Array.max_length/import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticProperty/Array.max_length/star-import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ClrTypeStaticProperty/Array.max_length/type-alias Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/ComparisonChain/ordered FalseRefusal # #2432 false-refusal +read/constant-kind/LambdaParameterDefault/lambda/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/ClassComputedConst/Annotated/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/ClassComputedConst/Inferred/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/ClassLiteralConst/Annotated/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/ClassLiteralConst/Inferred/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/InstanceField/Annotated/SelfDot/Self/in-method Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/InstanceField/Inferred/SelfDot/Self/in-method Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/InstanceProperty/Annotated/SelfDot/Self/in-method Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/StaticProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/StaticProperty/Annotated/Alias/Self/in-method Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/StaticProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/StaticProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/StaticProperty/Annotated/Qualified/Self/in-method Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/OwnMember/StaticProperty/Annotated/SelfDot/Self/in-method Ice # #2147 ice +read/constant-kind/LambdaParameterDefault/lambda/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/StdlibModuleVariable/socket.AF_INET/import Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/StdlibModuleVariable/socket.AF_INET/import-as Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/LambdaParameterDefault/lambda/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrLiteralField/subprocess.PIPE/from-import FalseRefusal # #2432 false-refusal +read/constant-kind/ParameterDefault/def/ClrLiteralField/subprocess.PIPE/from-import-as FalseRefusal # #2432 false-refusal +read/constant-kind/ParameterDefault/def/ClrLiteralField/subprocess.PIPE/star-import FalseRefusal # #2432 false-refusal +read/constant-kind/ParameterDefault/def/ClrStaticMember/sys.maxsize/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrStaticMember/sys.maxsize/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeMethod/Value/Math.sqrt/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeMethod/Value/Math.sqrt/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeMethod/Value/Math.sqrt/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeMethod/Value/Math.sqrt/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeMethod/Value/Math.sqrt/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeMethod/Value/Math.sqrt/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticProperty/Array.max_length/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticProperty/Array.max_length/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticProperty/Array.max_length/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticProperty/Array.max_length/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticProperty/Array.max_length/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ClrTypeStaticProperty/Array.max_length/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ComparisonChain/ordered FalseRefusal # #2432 false-refusal +read/constant-kind/ParameterDefault/def/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ModuleFunction/Value/math.sqrt/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ModuleFunction/Value/math.sqrt/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ModuleFunctionGroup/Value/math.log/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/ModuleFunctionGroup/Value/math.log/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/ClassComputedConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ParameterDefault/def/OwnMember/ClassComputedConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ParameterDefault/def/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/def/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/def/OwnMember/StaticField/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ParameterDefault/def/OwnMember/StaticField/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/def/OwnMember/StaticField/Inferred/Bare/Self/Later/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ParameterDefault/def/OwnMember/StaticField/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/def/OwnMember/StaticMethod/Annotated/Alias/Self/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/StaticMethod/Annotated/Alias/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/StaticMethod/Annotated/Bare/Self/Later/Value/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ParameterDefault/def/OwnMember/StaticMethod/Annotated/Bare/Self/Later/outer=ModuleDef/Value/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ParameterDefault/def/OwnMember/StaticMethod/Annotated/Qualified/Base/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/StaticMethod/Annotated/Qualified/Self/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/StaticMethod/Annotated/Qualified/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/StaticProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/StaticProperty/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/StaticProperty/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/ParameterDefault/def/OwnMember/StaticProperty/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/def/OwnMember/StaticProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/StaticProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/ParameterDefault/def/OwnMember/StaticProperty/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StdlibModuleVariable/socket.AF_INET/import Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StdlibModuleVariable/socket.AF_INET/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/def/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrStaticMember/sys.maxsize/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrStaticMember/sys.maxsize/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethod/Value/Math.sqrt/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethod/Value/Math.sqrt/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethod/Value/Math.sqrt/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethod/Value/Math.sqrt/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethod/Value/Math.sqrt/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethod/Value/Math.sqrt/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethodGroup/Value/Math.abs/from-import FalseRefusal # #2277 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethodGroup/Value/Math.abs/from-import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethodGroup/Value/Math.abs/import FalseRefusal # #2277 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethodGroup/Value/Math.abs/import-as FalseRefusal # #2277 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethodGroup/Value/Math.abs/star-import FalseRefusal # #2277 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeMethodGroup/Value/Math.abs/type-alias FalseRefusal # #2277 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticProperty/Array.max_length/from-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticProperty/Array.max_length/from-import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticProperty/Array.max_length/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticProperty/Array.max_length/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticProperty/Array.max_length/star-import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ClrTypeStaticProperty/Array.max_length/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ModuleFunction/Value/math.sqrt/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ModuleFunction/Value/math.sqrt/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ModuleFunctionGroup/Value/math.log/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/ModuleFunctionGroup/Value/math.log/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Annotated/Alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Annotated/Qualified Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Inferred/Alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Inferred/Alias/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Inferred/Qualified Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassComputedConst/Inferred/Qualified/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Annotated/Alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Annotated/Qualified Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Inferred/Alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Inferred/Alias/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Inferred/Bare/Self/Later/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Inferred/Qualified Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticField/Inferred/Qualified/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticMethod/Annotated/Alias/Self/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticMethod/Annotated/Alias/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticMethod/Annotated/Bare/Self/Later/Value/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticMethod/Annotated/Bare/Self/Later/outer=ModuleDef/Value/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticMethod/Annotated/Qualified/Base/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticMethod/Annotated/Qualified/Self/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticMethod/Annotated/Qualified/Value Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticProperty/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticProperty/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 false-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticProperty/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/OwnMember/StaticProperty/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StdlibModuleVariable/socket.AF_INET/import Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StdlibModuleVariable/socket.AF_INET/import-as Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/ParameterDefault/struct-auto-property/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrLiteralField/subprocess.PIPE/from-import FalseRefusal # #2432 false-refusal +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrLiteralField/subprocess.PIPE/from-import-as FalseRefusal # #2432 false-refusal +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrLiteralField/subprocess.PIPE/star-import FalseRefusal # #2432 false-refusal +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrStaticMember/sys.maxsize/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrStaticMember/sys.maxsize/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeMethod/Value/Math.sqrt/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeMethod/Value/Math.sqrt/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeMethod/Value/Math.sqrt/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeMethod/Value/Math.sqrt/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeMethod/Value/Math.sqrt/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeMethod/Value/Math.sqrt/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticProperty/Array.max_length/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticProperty/Array.max_length/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticProperty/Array.max_length/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticProperty/Array.max_length/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticProperty/Array.max_length/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ClrTypeStaticProperty/Array.max_length/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ComparisonChain/ordered FalseRefusal # #2432 false-refusal +read/constant-kind/PerInstanceFieldDefault/dataclass/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ModuleFunction/Value/math.sqrt/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ModuleFunction/Value/math.sqrt/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ModuleFunctionGroup/Value/math.log/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/ModuleFunctionGroup/Value/math.log/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/ClassComputedConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/ClassComputedConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticField/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticField/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticField/Inferred/Bare/Self/Later/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticField/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticMethod/Annotated/Alias/Self/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticMethod/Annotated/Alias/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticMethod/Annotated/Bare/Self/Later/Value/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticMethod/Annotated/Bare/Self/Later/outer=ModuleDef/Value/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticMethod/Annotated/Qualified/Base/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticMethod/Annotated/Qualified/Self/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticMethod/Annotated/Qualified/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticProperty/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticProperty/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticProperty/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/OwnMember/StaticProperty/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StdlibModuleVariable/socket.AF_INET/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StdlibModuleVariable/socket.AF_INET/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/dataclass/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrLiteralField/subprocess.PIPE/from-import FalseRefusal # #2432 false-refusal +read/constant-kind/PerInstanceFieldDefault/struct/ClrLiteralField/subprocess.PIPE/from-import-as FalseRefusal # #2432 false-refusal +read/constant-kind/PerInstanceFieldDefault/struct/ClrLiteralField/subprocess.PIPE/star-import FalseRefusal # #2432 false-refusal +read/constant-kind/PerInstanceFieldDefault/struct/ClrStaticMember/sys.maxsize/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrStaticMember/sys.maxsize/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeDeclinedMethod/Value/Char.is_ascii_digit/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeMethod/Value/Math.sqrt/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeMethod/Value/Math.sqrt/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeMethod/Value/Math.sqrt/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeMethod/Value/Math.sqrt/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeMethod/Value/Math.sqrt/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeMethod/Value/Math.sqrt/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/BitConverter.is_little_endian/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/BitConverter.is_little_endian/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/BitConverter.is_little_endian/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/BitConverter.is_little_endian/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/BitConverter.is_little_endian/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/BitConverter.is_little_endian/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/String.empty/builtin-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/String.empty/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/String.empty/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/String.empty/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/String.empty/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/String.empty/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticField/String.empty/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticProperty/Array.max_length/from-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticProperty/Array.max_length/from-import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticProperty/Array.max_length/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticProperty/Array.max_length/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticProperty/Array.max_length/star-import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ClrTypeStaticProperty/Array.max_length/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ComparisonChain/ordered FalseRefusal # #2432 false-refusal +read/constant-kind/PerInstanceFieldDefault/struct/IntEnumName/name/type-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ModuleFunction/Value/math.sqrt/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ModuleFunction/Value/math.sqrt/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ModuleFunctionGroup/Value/math.log/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/ModuleFunctionGroup/Value/math.log/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/ClassComputedConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/ClassComputedConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/ClassLiteralConst/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/ClassLiteralConst/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticField/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticField/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticField/Inferred/Bare/Self/Later/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticField/Inferred/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticMethod/Annotated/Alias/Self/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticMethod/Annotated/Alias/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticMethod/Annotated/Bare/Self/Later/Value/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticMethod/Annotated/Bare/Self/Later/outer=ModuleDef/Value/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticMethod/Annotated/Qualified/Base/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticMethod/Annotated/Qualified/Self/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticMethod/Annotated/Qualified/Value Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticProperty/Annotated/Alias/Self Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticProperty/Annotated/Bare/Self/Later/bare-sibling FalseRefusal # #2423 wrong-code +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticProperty/Annotated/Bare/Self/Later/outer=ModuleLiteralConst/bare-sibling SilentWrong # #2423 missing-refusal +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/OwnMember/StaticProperty/Annotated/Qualified/Self Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StdlibModuleVariable/math.pi/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StdlibModuleVariable/math.pi/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StdlibModuleVariable/socket.AF_INET/import Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StdlibModuleVariable/socket.AF_INET/import-as Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StringEnumMember/member/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StringEnumMember/member/type-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StringEnumName/name/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StringEnumName/name/type-name Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StringEnumValue/EnumValue/value/type-alias Ice # #2432 ice +read/constant-kind/PerInstanceFieldDefault/struct/StringEnumValue/EnumValue/value/type-name Ice # #2432 ice +read/constant-kind/enum-member/ClrStaticMember/sys.maxsize/from-import Ice # #2432 ice +read/constant-kind/enum-member/ClrStaticMember/sys.maxsize/from-import-as Ice # #2432 ice +read/constant-kind/enum-member/ClrStaticMember/sys.maxsize/import Ice # #2432 ice +read/constant-kind/enum-member/ClrStaticMember/sys.maxsize/import-as Ice # #2432 ice +read/constant-kind/enum-member/ClrStaticMember/sys.maxsize/star-import Ice # #2432 ice +read/constant-kind/enum-member/ClrTypeStaticProperty/Array.max_length/from-import Ice # #2432 ice +read/constant-kind/enum-member/ClrTypeStaticProperty/Array.max_length/from-import-as Ice # #2432 ice +read/constant-kind/enum-member/ClrTypeStaticProperty/Array.max_length/import Ice # #2432 ice +read/constant-kind/enum-member/ClrTypeStaticProperty/Array.max_length/import-as Ice # #2432 ice +read/constant-kind/enum-member/ClrTypeStaticProperty/Array.max_length/star-import Ice # #2432 ice +read/constant-kind/enum-member/ClrTypeStaticProperty/Array.max_length/type-alias Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ClassComputedConst/Annotated/Alias Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ClassComputedConst/Annotated/Qualified Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ClassComputedConst/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ClassComputedConst/Inferred/Alias Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ClassComputedConst/Inferred/Qualified Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ClassComputedConst/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ModuleComputedConst/Annotated/Bare Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ModuleComputedConst/Inferred/Bare Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ModuleProperty/Annotated/Bare Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ModuleVar/Annotated/Bare Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/ModuleVar/Inferred/Bare Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/StaticField/Annotated/Alias Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/StaticField/Annotated/Qualified Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/StaticField/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/StaticField/Inferred/Alias Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/StaticField/Inferred/Qualified Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/StaticField/Inferred/Qualified/Base Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/StaticProperty/Annotated/Alias Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/StaticProperty/Annotated/Qualified Ice # #2432 ice +read/constant-kind/enum-member/OwnMember/StaticProperty/Annotated/Qualified/Base Ice # #2432 ice +read/constant-kind/enum-member/StdlibModuleVariable/socket.AF_INET/from-import Ice # #2432 ice +read/constant-kind/enum-member/StdlibModuleVariable/socket.AF_INET/from-import-as Ice # #2432 ice +read/constant-kind/enum-member/StdlibModuleVariable/socket.AF_INET/import Ice # #2432 ice +read/constant-kind/enum-member/StdlibModuleVariable/socket.AF_INET/import-as Ice # #2432 ice +read/constant-kind/enum-member/StdlibModuleVariable/socket.AF_INET/star-import Ice # #2432 ice +read/init-overload/InitDelegation/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/ConstInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/ConstInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/ConstInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/ConstInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/DataclassInitFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/DataclassInitFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/DataclassInitFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/DataclassInitFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/InstanceFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/InstanceFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/InstanceFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/InstanceFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/StaticInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/StaticInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/StaticInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/StaticInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/StructInitFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/StructInitFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/StructInitFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Annotated/StructInitFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/ConstInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/ConstInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/ConstInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/ConstInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/DataclassInitFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/DataclassInitFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/DataclassInitFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/DataclassInitFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/InstanceFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/InstanceFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/InstanceFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/InstanceFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/StaticInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/StaticInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/StaticInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/StaticInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/StructInitFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/StructInitFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/StructInitFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/ArrowLambda/ClassLiteralConst/Inferred/StructInitFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Def/ClassLiteralConst/Annotated/ParameterDefault/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Def/ClassLiteralConst/Inferred/ParameterDefault/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/ConstInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/ConstInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Annotated/ConstInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/ConstInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/DataclassInitFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/DataclassInitFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Annotated/DataclassInitFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/DataclassInitFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/InstanceFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/InstanceFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Annotated/InstanceFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/InstanceFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/StaticInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/StaticInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Annotated/StaticInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/StaticInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/StructInitFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/StructInitFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Annotated/StructInitFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Annotated/StructInitFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/ConstInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/ConstInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Inferred/ConstInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/ConstInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/DataclassInitFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/DataclassInitFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Inferred/DataclassInitFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/DataclassInitFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/InstanceFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/InstanceFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Inferred/InstanceFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/InstanceFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/StaticInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/StaticInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Inferred/StaticInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/StaticInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/StructInitFieldInitializer/Earlier FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/StructInitFieldInitializer/Earlier/outer=ModuleLiteralConst SilentWrong # #2423 silent-wrong +read/lambda-default/Lambda/ClassLiteralConst/Inferred/StructInitFieldInitializer/Later FalseRefusal # #2423 false-refusal +read/lambda-default/Lambda/ClassLiteralConst/Inferred/StructInitFieldInitializer/Later/outer=ModuleLiteralConst SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleProperty/Absent/callable RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleProperty/Absent/class RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleProperty/Absent/enum SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleProperty/Absent/int SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleProperty/Absent/list RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleProperty/Absent/literal-string SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleProperty/Absent/nullable SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleProperty/Absent/optional RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleProperty/Absent/result RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleProperty/Absent/str SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleProperty/Absent/struct SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleProperty/Absent/tuple SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleVar/Absent/callable RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleVar/Absent/class RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleVar/Absent/enum SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleVar/Absent/int SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleVar/Absent/list RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleVar/Absent/literal-string SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleVar/Absent/nullable SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleVar/Absent/optional RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleVar/Absent/result RuntimeThrow # #2423 runtime-throw +read/no-initializer/ModuleVar/Absent/str SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleVar/Absent/struct SilentWrong # #2423 missing-refusal +read/no-initializer/ModuleVar/Absent/tuple SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/class/callable RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/class/class RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/class/enum SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/class/int SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/class/list RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/class/literal-string SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/class/nullable SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/class/optional RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/class/result RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/class/str SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/class/struct SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/class/tuple SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/struct/callable RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/struct/class RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/struct/enum SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/struct/int SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/struct/list RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/struct/literal-string SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/struct/nullable SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/struct/optional RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/struct/result RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticField/Absent/struct/str SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/struct/struct SilentWrong # #2423 missing-refusal +read/no-initializer/StaticField/Absent/struct/tuple SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/class/callable RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/class/class RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/class/enum SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/class/int SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/class/list RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/class/literal-string SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/class/nullable SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/class/optional RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/class/result RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/class/str SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/class/struct SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/class/tuple SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/struct/callable RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/struct/class RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/struct/enum SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/struct/int SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/struct/list RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/struct/literal-string SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/struct/nullable SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/struct/optional RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/struct/result RuntimeThrow # #2423 runtime-throw +read/no-initializer/StaticProperty/Absent/struct/str SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/struct/struct SilentWrong # #2423 missing-refusal +read/no-initializer/StaticProperty/Absent/struct/tuple SilentWrong # #2423 missing-refusal +read/typed-read/ClassComputedConst/Annotated/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Annotated/Later/Qualified/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Alias/ConstInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Alias/InstanceFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Alias/MethodBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Alias/StaticInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Bare/ConstInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Bare/DataclassInitFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Bare/InstanceFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Bare/InstancePropertyDefault/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Bare/StaticInitializer/ComprehensionIterable Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Bare/StaticInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Bare/StaticPropertyDefault/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Bare/StructInitFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/AccessorGetBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/AccessorSetBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/ComprehensionElement/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/ComprehensionIterable/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/ConstInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/DataclassInitFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/GeneratorBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/InitBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/InstanceFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/InstancePropertyDefault/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/LambdaImmediate/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/LambdaPassed/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/LambdaStored/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/MethodBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/NestedClassMethodBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/NestedDefInMethod/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/StaticInitializer/ComprehensionElement Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/StaticInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/StaticInitializer/Lambda Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/StaticMethodBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/StaticPropertyDefault/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/Qualified/StructInitFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/AccessorGetBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/AccessorSetBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/ComprehensionElement/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/ComprehensionIterable/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/GeneratorBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/InitBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/LambdaImmediate/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/LambdaPassed/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/LambdaStored/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/MethodBody/Direct Ice # #2423 ice +read/typed-read/ClassComputedConst/Inferred/Later/SelfDot/NestedDefInMethod/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Annotated/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Annotated/Later/Qualified/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Alias/ConstInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Alias/InstanceFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Alias/MethodBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Alias/StaticInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/ConstInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/DataclassFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/DataclassInitFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/InstanceFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/InstancePropertyDefault/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/ParameterDefault/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/StaticInitializer/ComprehensionIterable Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/StaticInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/StaticPropertyDefault/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/StructFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Bare/StructInitFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/AccessorGetBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/AccessorSetBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/ComprehensionElement/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/ComprehensionIterable/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/ConstInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/DataclassFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/DataclassInitFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/GeneratorBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/InitBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/InstanceFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/InstancePropertyDefault/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/LambdaImmediate/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/LambdaPassed/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/LambdaStored/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/MethodBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/NestedClassMethodBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/NestedDefInMethod/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/ParameterDefault/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/StaticInitializer/ComprehensionElement Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/StaticInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/StaticInitializer/Lambda Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/StaticMethodBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/StaticPropertyDefault/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/StructFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/Qualified/StructInitFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/AccessorGetBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/AccessorSetBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/ComprehensionElement/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/ComprehensionIterable/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/GeneratorBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/InitBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/LambdaImmediate/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/LambdaPassed/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/LambdaStored/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/MethodBody/Direct Ice # #2423 ice +read/typed-read/ClassLiteralConst/Inferred/Later/SelfDot/NestedDefInMethod/Direct Ice # #2423 ice +read/typed-read/InstanceField/Annotated/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/InstanceField/Annotated/Later/Qualified/FunctionBody/Direct Ice # #2423 ice +read/typed-read/InstanceField/Inferred/Earlier/Alias/FunctionBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/Qualified/FunctionBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/AccessorGetBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/AccessorSetBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/ComprehensionElement/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/ComprehensionIterable/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/GeneratorBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/InitBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/LambdaImmediate/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/LambdaPassed/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/LambdaStored/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/MethodBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Earlier/SelfDot/NestedDefInMethod/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/Alias/FunctionBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/Qualified/FunctionBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/AccessorGetBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/AccessorSetBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/ComprehensionElement/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/ComprehensionIterable/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/GeneratorBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/InitBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/LambdaImmediate/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/LambdaPassed/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/LambdaStored/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/MethodBody/Direct Ice # #2417 ice +read/typed-read/InstanceField/Inferred/Later/SelfDot/NestedDefInMethod/Direct Ice # #2417 ice +read/typed-read/InstanceMethod/Annotated/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/InstanceMethod/Annotated/Later/Qualified/FunctionBody/Direct Ice # #2423 ice +read/typed-read/InstanceProperty/Annotated/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/InstanceProperty/Annotated/Later/Qualified/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/AccessorGetBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/AccessorSetBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/ComprehensionElement/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/ComprehensionIterable/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/ConstInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/GeneratorBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/InitBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/InstanceFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/InstancePropertyDefault/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/LambdaImmediate/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/LambdaPassed/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/LambdaStored/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/MethodBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/ModuleAccessorBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/ModuleInitializer/ComprehensionElement Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/ModuleInitializer/ComprehensionIterable Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/ModuleInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/ModuleInitializer/Lambda Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/ModulePropertyInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/NestedClassMethodBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/NestedDefInFunction/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/NestedDefInMethod/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/StaticInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/StaticMethodBody/Direct Ice # #2423 ice +read/typed-read/ModuleComputedConst/Inferred/Later/Bare/StaticPropertyDefault/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/AccessorGetBody/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/AccessorSetBody/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ComprehensionElement/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ComprehensionIterable/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ConstInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/DataclassFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/GeneratorBody/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/InitBody/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/InstanceFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/InstancePropertyDefault/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/LambdaImmediate/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/LambdaPassed/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/LambdaStored/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/MethodBody/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ModuleAccessorBody/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ModuleInitializer/ComprehensionElement Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ModuleInitializer/ComprehensionIterable Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ModuleInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ModuleInitializer/Lambda Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ModulePropertyInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/NestedClassMethodBody/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/NestedDefInFunction/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/NestedDefInMethod/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/ParameterDefault/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/StaticInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/StaticMethodBody/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/StaticPropertyDefault/Direct Ice # #2423 ice +read/typed-read/ModuleLiteralConst/Inferred/Later/Bare/StructFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/AccessorGetBody/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/AccessorSetBody/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/ComprehensionElement/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/ComprehensionIterable/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/ConstInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/FunctionBody/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/GeneratorBody/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/InitBody/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/InstanceFieldInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/InstancePropertyDefault/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/LambdaImmediate/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/LambdaPassed/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/LambdaStored/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/MethodBody/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/ModuleAccessorBody/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/ModuleInitializer/ComprehensionElement Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/ModuleInitializer/ComprehensionIterable Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/ModuleInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/ModuleInitializer/Lambda Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/ModulePropertyInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/NestedClassMethodBody/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/NestedDefInFunction/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/NestedDefInMethod/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/StaticInitializer/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/StaticMethodBody/Direct Ice # #2423 ice +read/typed-read/ModuleProperty/Annotated/Later/Bare/StaticPropertyDefault/Direct Ice # #2423 ice +read/typed-read/ModuleVar/Annotated/Later/Bare/AccessorGetBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/AccessorSetBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/ComprehensionElement/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/ComprehensionIterable/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/ConstInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/FunctionBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/GeneratorBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/InitBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/InstanceFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/InstancePropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/LambdaImmediate/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/LambdaPassed/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/LambdaStored/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/MethodBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/ModuleAccessorBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/ModuleInitializer/ComprehensionElement FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/ModuleInitializer/ComprehensionIterable FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/ModuleInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/ModuleInitializer/Lambda FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/ModulePropertyInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/NestedClassMethodBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/NestedDefInFunction/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/NestedDefInMethod/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/StaticInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/StaticMethodBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Annotated/Later/Bare/StaticPropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/AccessorGetBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/AccessorSetBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/ComprehensionElement/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/ComprehensionIterable/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/ConstInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/FunctionBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/GeneratorBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/InitBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/InstanceFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/InstancePropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/LambdaImmediate/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/LambdaPassed/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/LambdaStored/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/MethodBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/ModuleAccessorBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/ModuleInitializer/ComprehensionElement FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/ModuleInitializer/ComprehensionIterable FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/ModuleInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/ModuleInitializer/Lambda FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/ModulePropertyInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/NestedClassMethodBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/NestedDefInFunction/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/NestedDefInMethod/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/StaticInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/StaticMethodBody/Direct FalseRefusal # #2423 wrong-code +read/typed-read/ModuleVar/Inferred/Later/Bare/StaticPropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Annotated/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/StaticField/Annotated/Later/Bare/ConstInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Annotated/Later/Bare/DataclassInitFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Annotated/Later/Bare/InstanceFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Annotated/Later/Bare/InstancePropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Annotated/Later/Bare/StaticInitializer/ComprehensionIterable FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Annotated/Later/Bare/StaticInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Annotated/Later/Bare/StaticPropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Annotated/Later/Bare/StructInitFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Annotated/Later/Qualified/FunctionBody/Direct Ice # #2423 ice +read/typed-read/StaticField/Inferred/Earlier/Alias/ConstInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Alias/FunctionBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Alias/InstanceFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Alias/MethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Alias/StaticInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/AccessorGetBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/AccessorSetBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/ComprehensionElement/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/ComprehensionIterable/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/ConstInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/DataclassInitFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/FunctionBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/GeneratorBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/InitBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/InstanceFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/InstancePropertyDefault/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/LambdaImmediate/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/LambdaPassed/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/LambdaStored/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/MethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/NestedClassMethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/NestedDefInMethod/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/StaticInitializer/ComprehensionElement Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/StaticInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/StaticInitializer/Lambda Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/StaticMethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/StaticPropertyDefault/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/Qualified/StructInitFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/AccessorGetBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/AccessorSetBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/ComprehensionElement/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/ComprehensionIterable/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/GeneratorBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/InitBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/LambdaImmediate/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/LambdaPassed/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/LambdaStored/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/MethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Earlier/SelfDot/NestedDefInMethod/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Alias/ConstInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Alias/FunctionBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Alias/InstanceFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Alias/MethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Alias/StaticInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Bare/ConstInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Inferred/Later/Bare/DataclassInitFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Inferred/Later/Bare/InstanceFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Inferred/Later/Bare/InstancePropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Inferred/Later/Bare/StaticInitializer/ComprehensionIterable FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Inferred/Later/Bare/StaticInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Inferred/Later/Bare/StaticPropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Inferred/Later/Bare/StructInitFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticField/Inferred/Later/Qualified/AccessorGetBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/AccessorSetBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/ComprehensionElement/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/ComprehensionIterable/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/ConstInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/DataclassInitFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/FunctionBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/GeneratorBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/InitBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/InstanceFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/InstancePropertyDefault/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/LambdaImmediate/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/LambdaPassed/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/LambdaStored/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/MethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/NestedClassMethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/NestedDefInMethod/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/StaticInitializer/ComprehensionElement Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/StaticInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/StaticInitializer/Lambda Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/StaticMethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/StaticPropertyDefault/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/Qualified/StructInitFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/AccessorGetBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/AccessorSetBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/ComprehensionElement/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/ComprehensionIterable/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/GeneratorBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/InitBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/LambdaImmediate/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/LambdaPassed/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/LambdaStored/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/MethodBody/Direct Ice # #2417 ice +read/typed-read/StaticField/Inferred/Later/SelfDot/NestedDefInMethod/Direct Ice # #2417 ice +read/typed-read/StaticMethod/Annotated/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/StaticMethod/Annotated/Later/Bare/ConstInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticMethod/Annotated/Later/Bare/DataclassInitFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticMethod/Annotated/Later/Bare/InstanceFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticMethod/Annotated/Later/Bare/InstancePropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticMethod/Annotated/Later/Bare/StaticInitializer/ComprehensionIterable FalseRefusal # #2423 wrong-code +read/typed-read/StaticMethod/Annotated/Later/Bare/StaticInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticMethod/Annotated/Later/Bare/StaticPropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticMethod/Annotated/Later/Bare/StructInitFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticMethod/Annotated/Later/Qualified/FunctionBody/Direct Ice # #2423 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/AccessorGetBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/AccessorSetBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/ComprehensionElement/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/ComprehensionIterable/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/ConstInitializer/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/DataclassInitFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/FunctionBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/GeneratorBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/InitBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/InstanceFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/InstancePropertyDefault/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/LambdaImmediate/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/LambdaPassed/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/LambdaStored/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/MethodBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/NestedClassMethodBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/NestedDefInMethod/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/StaticInitializer/ComprehensionElement Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/StaticInitializer/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/StaticInitializer/Lambda Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/StaticMethodBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/StaticPropertyDefault/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Earlier/Qualified/StructInitFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Alias/FunctionBody/Direct Ice # #2423 ice +read/typed-read/StaticProperty/Annotated/Later/Bare/ConstInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticProperty/Annotated/Later/Bare/DataclassInitFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticProperty/Annotated/Later/Bare/InstanceFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticProperty/Annotated/Later/Bare/InstancePropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticProperty/Annotated/Later/Bare/StaticInitializer/ComprehensionIterable FalseRefusal # #2423 wrong-code +read/typed-read/StaticProperty/Annotated/Later/Bare/StaticInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticProperty/Annotated/Later/Bare/StaticPropertyDefault/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticProperty/Annotated/Later/Bare/StructInitFieldInitializer/Direct FalseRefusal # #2423 wrong-code +read/typed-read/StaticProperty/Annotated/Later/Qualified/AccessorGetBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/AccessorSetBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/ComprehensionElement/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/ComprehensionIterable/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/ConstInitializer/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/DataclassInitFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/FunctionBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/GeneratorBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/InitBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/InstanceFieldInitializer/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/InstancePropertyDefault/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/LambdaImmediate/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/LambdaPassed/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/LambdaStored/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/MethodBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/NestedClassMethodBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/NestedDefInMethod/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/StaticInitializer/ComprehensionElement Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/StaticInitializer/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/StaticInitializer/Lambda Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/StaticMethodBody/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/StaticPropertyDefault/Direct Ice # #2417 ice +read/typed-read/StaticProperty/Annotated/Later/Qualified/StructInitFieldInitializer/Direct Ice # #2417 ice