Skip to content

Commit 46f8fc0

Browse files
ondrejmirtesclaude
andcommitted
Restructure ClosureTypeResolver around single-walk closure type builders
buildClosureTypeForClosure()/buildClosureTypeForArrowFunction() construct a ClosureType from the return/yield statements and execution ends a prior body walk already gathered (reading their types off the gathered scopes, natively via the promoted flavour when asked), without walking the body again. getClosureType() - the walking resolver - now shares their whole tail: parameter building (defaults priced through InitializerExprTypeResolver), the never/void execution-end derivation, the Generator return shape, and the final assembly with its cache write. array_map() callbacks and immediately invoked closures keep re-walking (their parameters are typed from the call site, so a foreign walk's gathered scopes would answer wrongly). No caller feeds the builders yet; cache keys and cache participation are unchanged (arrows still price fresh on every ask). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DaBZjgksga4c5s6Q9FniY7
1 parent 28520db commit 46f8fc0

1 file changed

Lines changed: 584 additions & 276 deletions

File tree

0 commit comments

Comments
 (0)