For generators are eager in values, but should be lazy
Open
bug
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
```groovy
x = new {
["one"] = 1
["two"] = this["one"] + 1
}
y = (x) {
for (k, v in x) {
[k] = v + 1
}
}
```
Here, `y["two"]` should be 4, not 3.
`for (v in x) {}` should iterate over lazy values, and `for (k, v in x) {}` should iterate over eager keys and lazy values.
Contributor guide
Research direction
The issue names no file, test, or entry point. Start by locating the implementation and tests for generator for-loops, then verify the example produces y["two"] as 4 and that single-value iteration remains lazy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100