Skip to content

Preserve static parts in dynamic container descriptors#15363

Merged
josevalim merged 3 commits into
elixir-lang:mainfrom
gldubc:preserve-dynamic-container-static
May 13, 2026
Merged

Preserve static parts in dynamic container descriptors#15363
josevalim merged 3 commits into
elixir-lang:mainfrom
gldubc:preserve-dynamic-container-static

Conversation

@gldubc
Copy link
Copy Markdown
Member

@gldubc gldubc commented May 12, 2026

This is an updated version of #15275, rebased on current main, with follow-up refinements.

Closes #15273.

@gldubc gldubc marked this pull request as draft May 12, 2026 18:27
@gldubc
Copy link
Copy Markdown
Member Author

gldubc commented May 13, 2026

I slightly modified the tuple emptiness algorithm while implementing this feature.

  1. we perform only a structural check for empty elements when building a tuple, to avoid recursive calling of empty?
  2. adjusted the way intersection is computed, to make sure no "type which is equivalent to none() but not exactly @none" can slip un-noticed

I think it's good now

@gldubc gldubc marked this pull request as ready for review May 13, 2026 09:38
@josevalim josevalim merged commit 472a49d into elixir-lang:main May 13, 2026
15 checks passed
@josevalim
Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

@gldubc gldubc deleted the preserve-dynamic-container-static branch May 13, 2026 11:19
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.

Container type constructors drop static parts of gradual element types

3 participants