Bool index says 'cannot index list' without naming the bool (slice path names it)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start by reproducing the examples in the issue on v0.48.0, then trace how list and dictionary indexing errors are produced in the interpreter and JIT. Add a regression test for the wrong index types and compare interpreter and JIT output with tools/jit_diff.sh. Done means each error names the received type and accepted index type, while preserving the error kind.
由索引模型根據 Issue 內容生成。
描述
Indexing with a bool raises, as docs/llms.txt says it should, but the message does not say why. The slice path already gives a precise message, so the two disagree.
To reproduce (v0.48.0, release build)
xs is [1, 2]
d is {"a": 1}
try:
print of xs[true]
catch e:
print of e.message
try:
print of d[true]
catch e:
print of e.message
try:
print of xs[true:]
catch e:
print of e.message
Actual
cannot index list
cannot index dict
slice bound must be an integer or null, got bool
Expected
The index messages name the index type the way the slice message does, e.g. list index must be an integer, got bool and dict key must be a string, got bool (whatever the real accepted key types are).
Done when
-
xs[true]andd[true]raise with a message that namesbooland the accepted index type; the error kind is unchanged. - Other wrong index types (
xs["a"],xs[null],xs[[0]]) name their type too. - Interpreter and JIT give the same text (tools/jit_diff.sh stays clean).
- A regression test fails on v0.48.0 and passes on the fix.
Found while checking docs/llms.txt against the runtime (PR #2193).
Generated by Claude Code
- 主要語言
- C
- 星號
- 3
- 分支
- 7
- 平均合併
- 6 小時 32 分鐘
- 30 天內合併 PR
- 285
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
InauguralSystems/EigenScript 的其他 Issue
-
good first issue needs-triage
難度 1/5 1 小時以內 新手友好度 88/100
InauguralSystems/EigenScript#2347 · 1 則留言 ·
維護者通常 1 天內回覆
-
needs-triage
難度 1/5 1 小時以內 新手友好度 82/100
InauguralSystems/EigenScript#2335 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:embed kind:bug
難度 2/5 1-3 小時 新手友好度 62/100
InauguralSystems/EigenScript#2311 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:gates kind:gate-defect
難度 2/5 1-3 小時 新手友好度 62/100
InauguralSystems/EigenScript#2305 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:ci bug found-by:duet-audit
難度 2/5 1-3 小時 新手友好度 62/100
InauguralSystems/EigenScript#2283 ·
維護者通常 1 天內回覆
查看 InauguralSystems/EigenScript 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
FujiNetWIFI/fujinet-config#379 ·
維護者通常 1 天內回覆
-
Ship /Local/Applications, the Local domain's Applications folder可能已有人在做 @pkgdemon 今天認領。 未關閉area:base enhancement
難度 1/5 1 小時以內 新手友好度 94/100
nextbsd/nextbsd-userland#612 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
zephyrproject-rtos/zephyr#125543 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
colbymchenry/codegraph#3277 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100