Skip to content

Conversation

@l1x
Copy link

@l1x l1x commented Jan 9, 2026

Elixir 1.19+ type checker warns when using struct update syntax with a dynamic type. Since the function head already pattern matches on %SweetXpath{}, we can safely use map update syntax instead.

Elixir 1.19+ type checker warns when using struct update syntax with a
dynamic type. Since the function head already pattern matches on
%SweetXpath{}, we can safely use map update syntax instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shakadak
Copy link
Member

Shakadak commented Jan 9, 2026

Hello, the warning was removed before releasing elixir 1.19, they might come back in 1.20 though.
Considering this uncertainty, I would rather hold off removing assertions in the code that could help for tools like dialyzer and language servers when using older versions of Elixir (and we do have a lot of our projects at work in this situation).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants