-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: fix implementation of makeAs to prevent hiding error locations
The previous implementation made an index call to collect the value, hiding the location of errors from the error syntax renderer. Fix and simplify the macro implementation to avoid this.
- Loading branch information
Showing
2 changed files
with
25 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
! mito -data state.json src.cel | ||
! stdout . | ||
cmp stderr want_err.txt | ||
|
||
-- state.json -- | ||
{"url": "", "id": 0} | ||
-- src.cel -- | ||
get(state.url+state.id).as(r, r.map(k, k)) | ||
-- want_err.txt -- | ||
failed eval: ERROR: <input>:1:14: no such overload | ||
| get(state.url+state.id).as(r, r.map(k, k)) | ||
| .............^ |