Skip to content

fix issue where record type spreads would not be picked up #6305

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 1 commit into from
Jun 21, 2023

Conversation

zth
Copy link
Collaborator

@zth zth commented Jun 21, 2023

Fixes #6293

The mechanism for processing record type spreads was only triggered if the record type definition had a spread at the top position. This ensures that type spreads will be processed regardless of if a type spread is at the top position.

…ord definition did not have a type spread at the very top
@zth zth requested a review from cristianoc June 21, 2023 16:14
lbls
|> List.exists (fun l ->
match l with
| {ld_name = {txt = "..."}} -> true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it make sense to have the treatment of spread somewhere (e.g. dedicated file)? E.g. no mention of "..." outside that file, or the has_spread functionality.
It might, or might not, be useful. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it might be useful, yeah. Might make sense to do it together with the next "feature" for type spreads, should we decide to do something like support type arguments.

@zth
Copy link
Collaborator Author

zth commented Jun 21, 2023

Windows CI is red but everything else passes, so it doesn't seem to break because of these changes. Merging.

@zth zth merged commit ce43416 into master Jun 21, 2023
@zth zth deleted the fix-record-spread-not-in-1st-pos branch June 21, 2023 16:41
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.

Issue with record type spread not as first argument.
2 participants