Skip to content

Find the source of anonymous function closures and closure kwbody methods - #164

Open
jishnub wants to merge 1 commit into
JuliaDebug:masterfrom
jishnub:jb/anon-closures
Open

jishnub wants to merge 1 commit into
JuliaDebug:masterfrom
jishnub:jb/anon-closures

Conversation

@jishnub

@jishnub jishnub commented Nov 5, 2026

Copy link
Copy Markdown

Fixes #163.

  • is_func_expr(ex, ::Method): a function whose signature isn't a call is now matched like ->. Any where/:: wrapping is stripped and the argument tuple is matched.
  • kwmethod_basename: when no parameter type is named after the function, fall back to the closure object. Every kwbody has its own name in the first argname slot instead of #self#, and its function object is the first unnamed Function-typed argument after the keyword args. The positional args start right after it. The fallback runs only when the first argname isn't #self#, so it doesn't touch ordinary closures that take an unnamed function-typed argument.

Adds an "anonymous closures" testset covering positional and kwbody methods for both closure syntaxes. Tested on Julia 1.10.13 and 1.13.3.

🤖 Generated with Claude Code

…ethods

Fixes JuliaDebug#163.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

definition(String, m) returns nothing for anonymous function (…) … end closures and for closure keyword-body methods

1 participant