Skip to content
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

Fix recursive untagged variant type checking #7320

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

cristianoc
Copy link
Collaborator

Fixes #7314

  • Delay untagged variant well-formedness checks until after environment construction
  • Collect all untagged variant checks during type declaration processing
  • Perform checks once all recursive types are available in the environment
  • Add test case for valid recursive untagged variant type definitions

This fixes issues where recursive references in untagged variants would fail validation due to premature checking before the full type environment was built.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Syntax Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: 627aa90 Previous: 80744a5 Ratio
Print RedBlackTree.res - time/run 3.153901073333333 ms 2.9391152133333334 ms 1.07
Parse Napkinscript.res - time/run 65.47556327333334 ms 60.98575317999999 ms 1.07
Print Napkinscript.res - time/run 107.23577804 ms 102.03488166 ms 1.05
Print HeroGraphic.res - time/run 13.569018213333333 ms 12.308145193333333 ms 1.10

This comment was automatically generated by workflow using github-action-benchmark.

@cristianoc cristianoc requested a review from cknitt March 6, 2025 12:29
@cristianoc cristianoc force-pushed the untagged_recursive_check branch from 57f785d to b57e66e Compare March 6, 2025 12:29
Fixes #7314

- Delay untagged variant well-formedness checks until after environment construction
- Collect all untagged variant checks during type declaration processing
- Perform checks once all recursive types are available in the environment
- Add test case for valid recursive untagged variant type definitions

This fixes issues where recursive references in untagged variants would fail validation due to premature checking before the full type environment was built.
@cristianoc cristianoc force-pushed the untagged_recursive_check branch from b57e66e to 627aa90 Compare March 6, 2025 12:58
Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

🎉

@cristianoc cristianoc merged commit db89ef2 into master Mar 6, 2025
20 checks passed
@cristianoc cristianoc deleted the untagged_recursive_check branch March 6, 2025 13:42
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.

Unboxed variant doesn't work when a payload record is defined in the recursive type definition
2 participants