Skip to content

Thread full descr through fun_denormalize reduce#15524

Merged
josevalim merged 2 commits into
elixir-lang:mainfrom
lukaszsamson:ls-to_quoted_string-crash
Jun 24, 2026
Merged

Thread full descr through fun_denormalize reduce#15524
josevalim merged 2 commits into
elixir-lang:mainfrom
lukaszsamson:ls-to_quoted_string-crash

Conversation

@lukaszsamson

@lukaszsamson lukaszsamson commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Previously inner representation was threaded and returned, which broke expectations of caller non_term_type_to_quoted Fixes #15523

Assisted-by: Claude Opus 4.8 & GPT 5.5

Previously inner representation was threaded and returned, which broke expectations of caller `non_term_type_to_quoted`
Fixes elixir-lang#15523
# (a) must not raise when denormalization fails for an arity
assert opt_difference(fun([term()], atom()), fun([integer()], dynamic(atom())))
|> to_quoted_string() ==
"dynamic((term() -> atom()) and (integer() -> atom()))"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the rendered type is not precise here. The type is purely dynamic with upper bound (term() -> atom()) \ (integer() -> none()) and empty static part. The pretty printer drops arrow negations which, if I understand it, is by design

@josevalim josevalim merged commit 5fd1321 into elixir-lang:main Jun 24, 2026
12 of 15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

to_quoted_string crash and invalid output on dynamic function types

2 participants