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 StaticType.flatten() on AnyOfType containing AnyType #1395

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

alancai98
Copy link
Member

@alancai98 alancai98 commented Mar 20, 2024

Description

Fixes some previous buggy behavior when flattening an AnyOfType containing AnyType:

AnyOfType(setOf(StaticType.INT, StaticType.ANY))           // union(int, any)
AnyOfType(setOf(StaticType.INT, StaticType.ANY)).flatten() // union(int, any)

With this change, the above will now be:

AnyOfType(setOf(StaticType.INT, StaticType.ANY))           // union(int, any)
AnyOfType(setOf(StaticType.INT, StaticType.ANY)).flatten() // any

Other Information

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

github-actions bot commented Mar 20, 2024

Conformance comparison report

Base (327ea86) a66fd7e +/-
% Passing 92.54% 92.54% 0.00%
✅ Passing 5384 5384 0
❌ Failing 434 434 0
🔶 Ignored 0 0 0
Total Tests 5818 5818 0

Number passing in both: 5384

Number failing in both: 434

Number passing in Base (327ea86) but now fail: 0

Number failing in Base (327ea86) but now pass: 0

@alancai98 alancai98 changed the title Fix StaticType.flatten() on AnyOfType of AnyType Fix StaticType.flatten() on AnyOfType containing AnyType Mar 20, 2024
@alancai98 alancai98 marked this pull request as ready for review March 29, 2024 18:31
@alancai98 alancai98 self-assigned this Mar 29, 2024
RCHowell
RCHowell previously approved these changes Mar 29, 2024
@alancai98 alancai98 merged commit 6fbfa78 into main Mar 29, 2024
10 checks passed
@alancai98 alancai98 deleted the fix-any-type-in-anyoftype branch March 29, 2024 19:10
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