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

Type printer collision between arity-specific function top and maximal explicit arrow

未关闭
#15,829 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 Module.Types.Descr 开始,使用 fun(1)、fun([none()], term()) 和 to_quoted_string/1 重现冲突。跟踪类型打印器的路径,并将其输出与 equal?/2 和 subtype?/2 进行比较;当不同类型不再打印成相同内容,或已记录这种有意为之的行为时,即表示完成。

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

描述

Existing issue
  • I have searched existing issues and could not find a duplicate.
Elixir and Erlang/OTP versions

Erlang/OTP 28 [erts-16.4.0.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Elixir 1.21.0-dev (469c844) (compiled with Erlang/OTP 28)

Operating system

any

Current behavior

fun(1) and fun([none()], term()) are distinct types, but both currently print as (none() -> term()).

import Module.Types.Descr

top = fun(1)
arrow = fun([none()], term())

to_quoted_string(top)
#=> "(none() -> term())"

to_quoted_string(arrow)
#=> "(none() -> term())"

equal?(top, arrow)
#=> false

subtype?(arrow, top)
#=> true

subtype?(top, arrow)
#=> false

empty?(opt_difference(top, arrow))
#=> false
Expected behavior

Type printer improved. Alternatively if this is a deliberate choice it should be noted in the code documentation

主要语言
Elixir
星标
26.7k
派生
3.7k
平均合并
8 小时 8 分钟
30 天内合并 PR
61

环境准备

从这里开始

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

elixir-lang/elixir 的其他 Issue

查看 elixir-lang/elixir 的全部 Issue

相似的 Issue

更多 Elixir Issue

把新 issue 发到你的邮箱

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