You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is related to #513. If I have an object that is all of X and Y, and X is one of X1 or X2 and Y is one of Y1 or Y2, I'd expect that the resulting object would be (X1 | X2) & (Y1 | Y2) (or X & Y, since i don't have a preference how much decomposition there is), not (X1 | X2 | Y1 | Y2).
I'm not entirely sure how to fix this, but I have a test you can add to test/allof_oneof_test.ts that hits this issue and that continues the the player/team example of the other tests.
Thanks for taking a look! If you see a good work-around while investigating, that'd be awesome. While playing around with my actual code-base I observed that changing
will change the output type to (OneOf.Team | OneOf.Player) instead of (OneOf.Team1 | OneOf.Team2 | OneOf.Player1 | OneOf.Player2), so there's probably a way to 'fool' it with the existing code, but i wasn't able to find it.
I think this is related to #513. If I have an object that is
all of X and Y
, andX
isone of X1 or X2
andY
isone of Y1 or Y2
, I'd expect that the resulting object would be(X1 | X2) & (Y1 | Y2)
(orX & Y
, since i don't have a preference how much decomposition there is), not(X1 | X2 | Y1 | Y2)
.I'm not entirely sure how to fix this, but I have a test you can add to
test/allof_oneof_test.ts
that hits this issue and that continues the the player/team example of the other tests.or (to show that the issue persists even when
X
andY
parenthesize the oneOf correctlyThe text was updated successfully, but these errors were encountered: