Skip to content

Allow using protocol list implementation on improper lists #14366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 11, 2025

Conversation

sabiwara
Copy link
Contributor

Tentative fix for #14365

@@ -483,7 +486,7 @@ defmodule Module.Types.IntegrationTest do
dynamic(
%Date{} or %DateTime{} or %NaiveDateTime{} or %Time{} or %URI{} or %Version{} or
%Version.Requirement{}
) or atom() or binary() or float() or integer() or list(term())
) or atom() or binary() or empty_list() or float() or integer() or non_empty_list(term(), term())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder if we should format this as maybe_improper_list(term(), term()) instead (and make a public helper for it in descr)

}

assert_no_warnings(files, consolidate_protocols: true)
end
Copy link
Member

Choose a reason for hiding this comment

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

Ideally, if we can add this to one of the existing tests, it would be better, as they can be expensive!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find the perfect candidate, but maybe we can group regressions here under a single module, replacing the test descriptions by comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I like it!

@josevalim josevalim added this to the v1.19 milestone May 9, 2025
@sabiwara sabiwara force-pushed the improper-list-protocol branch from 5a624f7 to d097960 Compare May 10, 2025 23:38
@sabiwara
Copy link
Contributor Author

Nice, will merge this one and rebase+fix #14488

@sabiwara sabiwara merged commit e9c85a4 into elixir-lang:main May 11, 2025
10 of 11 checks passed
@sabiwara sabiwara deleted the improper-list-protocol branch May 11, 2025 10:42
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.

2 participants