x/y/z bindings not restored when a function body throws
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- compilers
Hướng nghiên cứu
Read imp-eval.mts around line 495, where the saved x, y, and z bindings are restored after function evaluation. Reproduce the reported sequence (x: 10, f: {x + bad}, then f[99]) and check the value of x after catching the error. Done means the original bindings remain intact after a function body throws; an open linked pull request already addresses this issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
From the Codex whole-repo review on #5 (review comment).
Location: imp-eval.mts:495 on main (6813323)
[P2] Restore parameter bindings when a function body throws
If
lastEvalthrows, execution skips restoration of the savedx,y, andzbindings, leaving function arguments in the shared word dictionary. In separate evaluations,x: 10,f: {x + bad}, andf[99]demonstrate this: after catching the undefined-word error, evaluatingxreturns 99 rather than 10. Since the REPL and MCP worker catch evaluation errors and continue using that dictionary, a failed call silently corrupts subsequent program state. Restore the bindings in afinallyblock.
Checked 2026-10-29: still present on main; not touched by open PRs #3, #4 or #7.
- Ngôn ngữ chính
- TypeScript
- Star
- 6
- Fork
- 1
- Merge trung bình
- 3 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tangentcode/implish
-
Evaluate right to left (K style)Có thể đã có người làm @tangentstorm đã nhận 17 ngày trước. Đang mởapproved
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
tangentcode/implish#21 ·
-
Error and multi-line string values don't show as loadable textCó thể đã có người làm @tangentstorm đã nhận 32 ngày trước. Đang mởapproved follow-up
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
tangentcode/implish#17 ·
-
Quoted lists lose their quote when shownCó thể đã có người làm @tangentstorm đã nhận 32 ngày trước. Đang mởapproved follow-up
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
tangentcode/implish#16 ·
-
Dict show: comma after symbol-valued key changes the key on reloadCó thể đã có người làm @tangentstorm đã nhận 32 ngày trước. Đang mởapproved follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
tangentcode/implish#11 ·
-
String literal escape sequences are not decodedCó thể đã có người làm @tangentstorm đã nhận 32 ngày trước. Đang mởapproved follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
tangentcode/implish#10 ·
Tất cả issue của tangentcode/implish
Issue tương tự
-
Amélioration du résumé regĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
MTES-MCT/monitorenv#3257 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
salesforce/sa11y#1022 ·
-
area/web platform/ios type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#67504 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Kartographer map markers lose their geo: link on non-English wikisCó thể đã có người làm @playlikeboy đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
openzim/mwoffliner#3014 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Report: Bloomberg HTĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày