Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

dict_set with a non-string key silently stores nothing

未关闭 适合新手
#1,642 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
c
领域
compilers

调研方向

定位 dict_set 内置函数的 C 实现,它位于那条对非字符串键已经抛出 type_mismatch 的索引赋值路径旁边——对比两者,看这个显式检查是如何实现的。将该检查照搬到 dict_set 以及其它写入字典键的同类内置函数中,然后使用 map_keys.eigs 探针(或 issue 中的代码片段)添加一个套件测试,并确认它在修复前于 v0.44.0 发布二进制上失败、修复后通过。

由索引模型根据 Issue 内容生成。

描述

area:stdlib kind:silent-wrong

Found by the guest-language value matrix (hq, pre-pass for #1286), probes run against the v0.44.0 release binary (full build).

d is {}
dict_set of [d, 1, "one"]
print of (keys of d)   # []   — no error, nothing stored
d[1.5] is "x"          # raises type_mismatch (index syntax is loud)

Index syntax rejects a non-string key loudly; dict_set drops it silently. Every guest language uses numeric map keys (Lua tables, Python dicts, Go maps); the matrix proposes a #1286 map-key row for the design question. This issue is just the silent drop. Probe: map_keys.eigs.

Done when

  • dict_set (and any sibling builtin that writes dict keys) raises on a non-string key, exactly as index assignment does, until #1286's map-key row decides otherwise.
  • A suite test fails on v0.44.0.
主要语言
C
星标
3
派生
7
平均合并
8 小时 43 分钟
30 天内合并 PR
253

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。