ecmarkup icon indicating copy to clipboard operation
ecmarkup copied to clipboard

missing variable error in abstract closures should suggest adding the variable to the captures list, if applicable

Open bakkot opened this issue 5 months ago • 0 comments

e.g.

1. Let _foo_ be 0.
1. Let _AC_ be a new Abstract Closure with no parameters that captures nothing and performs the following steps when called:
  1. Return _foo_.

This is an error because the AC uses but doesn't capture _foo_, but the error is just "could not find a preceding declaration for _foo_". If the thing being used exists outside the AC the error should suggest adding it to the captures list.

bakkot avatar Jul 22 '25 21:07 bakkot