Skip to content
New issue

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

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

Already on GitHub? # to your account

Handling of infinite collection initialization chains could be unified #75024

Closed
jjonescz opened this issue Sep 9, 2024 · 0 comments · Fixed by #75464
Closed

Handling of infinite collection initialization chains could be unified #75024

jjonescz opened this issue Sep 9, 2024 · 0 comments · Fixed by #75464
Assignees
Milestone

Comments

@jjonescz
Copy link
Member

jjonescz commented Sep 9, 2024

ERR_CollectionInitializerInfiniteChainOfAddCalls and ERR_ParamsCollectionInfiniteChainOfConstructorCalls

See #74899 (comment):

We are handling cycles through constructors (ERR_ParamsCollectionInfiniteChainOfConstructorCalls) elsewhere and with a different approach. I assume that at the time that handling was introduced, there was no way to get into a cycle through an Add method. It feels like we should unify and combine both checks, i.e. do them in the same place and use similar approaches for both.

@jjonescz jjonescz added Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality Feature - Collection Expressions Feature - ParamsCollections labels Sep 9, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Sep 9, 2024
@jaredpar jaredpar added this to the 17.13 milestone Sep 26, 2024
@jjonescz jjonescz self-assigned this Oct 9, 2024
@jjonescz jjonescz added 3 - Working and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants