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

Allow no-op type coercions within @fold scopes. #32

Merged
merged 4 commits into from Sep 18, 2017

Conversation

obi1kenobi
Copy link
Contributor

Using @fold on vertex fields of union type was practically impossible, since the union type requires a type coercion, and type coercions are disallowed within @fold scopes. This PR extends the use of the type_equivalence_hints optional compilation parameter, allowing the compiler to detect "no-op" coercions (e.g. from the union type to the type that a superclass of all other types in the union) and allow them inside @fold scopes.

See the updated test cases for examples.

@coveralls
Copy link

coveralls commented Sep 18, 2017

Coverage Status

Coverage decreased (-0.02%) to 93.757% when pulling 9301cb4 on coerce_to_base_type_within_fold into e8d4249 on master.

@coveralls
Copy link

coveralls commented Sep 18, 2017

Coverage Status

Coverage decreased (-0.02%) to 93.757% when pulling 7c9f87a on coerce_to_base_type_within_fold into e8d4249 on master.

@coveralls
Copy link

coveralls commented Sep 18, 2017

Coverage Status

Coverage increased (+0.03%) to 93.805% when pulling 38221e5 on coerce_to_base_type_within_fold into e8d4249 on master.

@obi1kenobi obi1kenobi merged commit b33a7f5 into master Sep 18, 2017
@obi1kenobi obi1kenobi deleted the coerce_to_base_type_within_fold branch September 20, 2017 18:06
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.

None yet

3 participants