Skip to content

Unskip ExtensionIndexerTests once Roslyn admits indexers in extension blocks #219

Description

@danfma

Context

#156 Stage 4 shipped the lowering for C# 14 extension indexers (item$get(self, index) / item$set(self, index, value), custom [IndexerName] support, receiver-once via IrLetExpression). Commit 7bfe7dd.

The 7 tests in tests/Metano.Tests/ExtensionIndexerTests.cs are [Skip]-gated because Roslyn 5.3.0 (.NET 10) rejects indexers inside extension(R) { … } blocks with:

error CS9282: this member is not allowed in an extension block

Even with LangVersion=preview. Verified against the SDK pinned in global.json.

Action when Roslyn unblocks

  1. Drop the [Skip(...)] markers in ExtensionIndexerTests.
  2. Run the suite. All 7 should pass without code changes — lowering paths are already wired (IrModuleFunctionExtractor.ConvertExtensionIndexerGetter + …Setter, IrExpressionExtractor.BuildExtensionIndexerGetCall + BuildExtensionIndexerAssignment + BuildExtensionIndexerIncrement).
  3. Regenerate any sample that exercises indexers; verify generated TS.
  4. Close this issue.

References

Decision recorded

Forward-compat merge chosen over hold-until-Roslyn so the lowering work doesn't bit-rot — sunk implementation cost is preserved, integration deltas show up the moment the syntax is admitted.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions