GitNexus/docs
Mick Cooney 1c65b99753 fix(r): bind R6 self to its enclosing class
`self$m()` inside an R6 method resolved by the shared lexical walk, because `self` had no type
binding. An inherited method got no edge, and a top-level function of the same name was bound
instead (0.49), as was one for a method that no class in the chain defines.

emitRScopeCaptures now types `self` in each R6 method (a function in the public, private or
active list of an R6Class call assigned to a name, bare or R6::) as that class, through a
synthetic @type-binding.self capture that interpretRTypeBinding reads with the shared `self`
source. The shared receiver pass then resolves the call through the class and its MRO at the
receiver-call confidence (0.85). Where self is no R6 instance (a free function, a parameter
named self, an R6Class call that is assigned to nothing, a RefClass method) the module and the
outermost function frames own `self` untyped (scopeOwnsReceivers), so the call is suppressed as
receiver-owned-but-unbound instead of reaching a free function. A file that binds `self` at top
level is exempt, so a global `self <- Foo$new()` still types its free functions' calls. For a
typed self whose class and parents lack the method, resolveReceiverMember answers an empty
ambiguous lookup, which stops the lexical fallback (outcome member-lookup-ambiguous; no shared
code is touched).

A class name containing a dot keeps the generic route: the shared pass reads it as qualified.
Documented in docs/languages/r-provider.md.

Tests: new r-self-binding fixture and test (c1-c13), r-call-shapes pins re-measured, two rename
fixtures (a free function sharing a name with an R6 method called through self).
2026-10-24 12:27:34 +01:00
..
languages fix(r): bind R6 self to its enclosing class 2026-10-24 12:27:34 +01:00
plans fix(scope): preserve lexical bindings in HTTP wrapper detection (#3632) 2026-10-20 11:36:06 +01:00
cli-reference.md docs: simplify guides and verify receiver gaps (#3694) 2026-10-23 09:06:03 +01:00
deployment.md feat(web): resolve a root-relative GITNEXUS_BACKEND_URL against the page origin (#3640) 2026-10-24 08:45:24 +01:00
editor-setup.md docs: simplify guides and verify receiver gaps (#3694) 2026-10-23 09:06:03 +01:00
mcp-reference.md docs: simplify guides and verify receiver gaps (#3694) 2026-10-23 09:06:03 +01:00
wiki-generation.md docs: simplify guides and verify receiver gaps (#3694) 2026-10-23 09:06:03 +01:00