GitNexus/gitnexus/test/unit/scope-resolution/csharp
Gergo Magyar 952350801c refactor(csharp-scope): remove as-unknown-as double casts in scope-resolver
Tighten three type boundaries that were previously papered over with
`as unknown as` casts:

  * `CsharpResolveContext.allFilePaths`: `Set<string>` → `ReadonlySet<string>`.
    The orchestrator only hands out a read-only view; drop the widening
    cast at the resolver-adapter site.
  * `resolveCsharpImportTarget`: call passes the narrow context directly.
    `WorkspaceIndex` is `unknown` in the shared contract, so the
    `as unknown as WorkspaceIndex` cast was gratuitous — structural
    assignability covers it.
  * `csharpMergeBindings`: drop unused `_scope: Scope` parameter. The
    implementation never read it; the cast chain in `scope-resolver.ts`
    existed only to satisfy an unused slot. LanguageProvider.mergeBindings
    now wraps with a tiny arrow adapter; ScopeResolver.mergeBindings
    passes through directly.

No runtime behavior change. `grep 'as unknown as' csharp/scope-resolver.ts`
returns zero matches.

Verified:
  - npx tsc --noEmit           clean
  - C# unit + integration      462/462 passing (incl. Python integration)
2026-04-22 08:45:38 +01:00
..
csharp-captures.test.ts feat(csharp-scope): parity Unit 1 — this/base receiver-binding synthesis 2026-04-21 18:26:00 +01:00
csharp-hooks.test.ts refactor(csharp-scope): remove as-unknown-as double casts in scope-resolver 2026-04-22 08:45:38 +01:00
csharp-imports.test.ts feat(csharp-scope): parity Unit 5a — IMPORTS edge + static-using mapping 2026-04-21 19:49:56 +01:00