$ the-wire · showcase
Elixir tightens open-map intersection in the type checker
By RepoJournal · Filed · About Elixir & Phoenix · Composed from the cited sources · methodology
José Valim's change to how the type checker intersects open maps with closed-map BDDs is the one item here that can alter compile-time inference, and the rest of the day is assertion and documentation cleanup in the same subsystem.
Do not nest open maps under closed maps which are their subtypes elixir-lang/elixir
When an open map such as the one from map.foo is intersected with a BDD of closed maps like structs, the checker now pushes the open map down the BDD instead of nesting it under closed literals that are its subtypes, so only the open map's fields are checked. Literals are never mutated, nodes rebuild only when a branch changed, and literals stay shared.
Fix the named-record typespec assertion (#16070) elixir-lang/elixir
Barna Kovacs corrected the named-record typespec assertion, which had been asserting the wrong thing on named records in typespecs.
Fix the underlying protocol error regression test (#16066) elixir-lang/elixir
The regression test covering the underlying protocol error was fixed to match actual behavior rather than the previous expectation.
Fix the zero-distance cursor-down assertion (#16058) elixir-lang/elixir
A zero-distance cursor-down assertion was corrected; it affected the test suite, not the compiler's runtime behavior.
Fix the NIF-loading example in Module documentation (#16072) elixir-lang/elixir
The NIF-loading example in the Module documentation was corrected, so anyone copying the snippet now gets a working load path.