Skip to content

Adding a check to avoid recursive type definitions#329

Open
rodrigogribeiro wants to merge 8 commits intomainfrom
no-recursion-on-types
Open

Adding a check to avoid recursive type definitions#329
rodrigogribeiro wants to merge 8 commits intomainfrom
no-recursion-on-types

Conversation

@rodrigogribeiro
Copy link
Collaborator

  • This PR adds a check which do not allow the declaration of recursive types (direct or indirect).
  • Add new tests and changes some tests to failing due to the use of recursive types.

* This PR adds a check which do not allow the declaration of recursive
types (direct or indirect).
* Add new tests and changes some tests to failing due to the use of
recursive types.
@rodrigogribeiro rodrigogribeiro requested review from Y-Nak and mbenke March 11, 2026 19:53
Copy link
Collaborator

@mbenke mbenke left a comment

Choose a reason for hiding this comment

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

I wonder whether just switching tests to 'expect failure' is the right way to go.

Also, we should think whether we want to allow recursive types in comptime.

@rodrigogribeiro rodrigogribeiro requested a review from mbenke March 12, 2026 17:56
* Adding an example suggested by Y-Nak.
@rodrigogribeiro rodrigogribeiro requested a review from Y-Nak March 16, 2026 17:37
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.

3 participants