Skip to content

Conversation

@zth
Copy link
Member

@zth zth commented Jun 28, 2023

Allow coercing between variants which have the same exact constructors. We need to ensure that the runtime representation exactly matches as we coerce. The following restrictions are therefore in place:

  • Both variants must have the same configuration for @unboxed and @tag
  • Each constructor pair must have the same configuration of @as

@zth zth marked this pull request as ready for review June 28, 2023 18:56
@zth zth force-pushed the variant-to-variant-coercion branch from 82c288e to 6cdc49e Compare June 28, 2023 19:01
@zth zth requested a review from cristianoc June 28, 2023 19:03
@zth
Copy link
Member Author

zth commented Jun 28, 2023

Probably need to check for unboxed too, right?

We already check that.

@zth zth merged commit 60cf75a into master Jun 29, 2023
@zth zth deleted the variant-to-variant-coercion branch June 29, 2023 18:04
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.

2 participants