missing variable error in abstract closures should suggest adding the variable to the captures list, if applicable
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 245
- Forks
- 80
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Locate the validation and diagnostic code for missing variables used inside abstract closures, then find the existing tests for that error. Reproduce the example and confirm that, when the variable exists outside the closure, the diagnostic suggests adding it to the captures list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100