bad error message with list comprehension over object
Open
error reporting
- Dominant language
- Go
- Stars
- 1.8k
- Forks
- 263
- PR merge metrics
- No merged PRs in 30d
Description
Somewhere deep in my nested object, a list got accidentally replaced with an object.
Minimal working example:
```
jsonnet -e '[a for a in {}]'
```
The error I get with go-jsonnet is:
```
RUNTIME ERROR: Unexpected type object, expected array
builtin function
During evaluation
```
Without telling me what happened or even where. After a while I gave up and tried the c++ version, which gave me:
```
RUNTIME ERROR: In comprehension, can only iterate over array.
:1:1-16
```
Contributor guide
Assessment
This issue has not been assessed yet.