Skip to content

Merge #1277 (bot type) prerequisite into #1280 (duck-type own method) - #55

Draft
apiology wants to merge 5 commits into
fix-raise-abort-bot-typefrom
fix-1257-duck-type-own-method
Draft

Merge #1277 (bot type) prerequisite into #1280 (duck-type own method)#55
apiology wants to merge 5 commits into
fix-raise-abort-bot-typefrom
fix-1257-duck-type-own-method

Conversation

@apiology

Copy link
Copy Markdown
Owner

Intra-fork PR to view the incremental diff and CI for PR castwide#1280 (castwide#1280) after merging in PR castwide#1277's prerequisite commit (bot type support, castwide#1277).

Not intended to merge upstream as-is — castwide/solargraph won't accept a base branch that only exists in a fork (see the github-cross-fork-pr-base skill). This exists purely so the incremental diff/CI for the follow-up bot? fix in Call#resolve is reviewable on its own, separate from castwide#1277's own diff.

The real upstream PR (castwide#1280) is untouched, still based on castwide/solargraph:master.

apiology and others added 5 commits August 11, 2026 11:32
Chain::Call#resolve converted duck-typed receivers to Object and
searched Object's real method stack, so a call matching the duck
type's own declared method (e.g. `# @PARAM thing [#read_body]` then
`thing.read_body`) was reported as unresolved at strict typecheck
levels and above, even though ApiMap#get_complex_type_methods already
handles this case correctly for completion. Special-case duck-type
receivers to synthesize a matching Pin::DuckMethod, mirroring
get_complex_type_methods. The pin is marked non-explicit so arity
checking (which has no real signature to check against) is skipped.

Fixes castwide#1257

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016tARKRqywwAoLhA6DnLCET
The fix in Chain::Call#resolve is level-independent, and alpha is the
strictest level, so testing there is a stronger guarantee than strict.

Claude-Session: https://claude.ai/code/session_016tARKRqywwAoLhA6DnLCET
…d#typify

Pin::DuckMethod.new never sets closure:, so the unconditional
closure.gates call crashed with NoMethodError on duck-typed method
calls. Use the pin's own gates accessor (already nil-safe) instead.

typify_from_super also returned an ancestor pin's raw, unqualified
return_type instead of calling pin.typify(api_map) on it, so a
borrowed type would be qualified against the duck pin's own
fabricated gates rather than the ancestor's real ones.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPC3E2mM9NLYTC7YY3GnG8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant