-
Notifications
You must be signed in to change notification settings - Fork 383
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
Implicit cast between Duration and TimeSpan #1365
Implicit cast between Duration and TimeSpan #1365
Conversation
Hmm, these failing CI tests pass on my machine. Any guidance? |
@Muximize I can't think of any, so I'd say let's just make a breaking change and not support it. For multiplication, they can switch order. |
As for the failing test case, that was my bad in a previous merged PR. |
I completely removed Also removed some tests for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another mistake on my part, I'll fix it.
See #1354 (comment)
One issue is that the operator overloads only work when
TimeSpan
is the right operand.I changed the code generation to take this into account, but another option would be to make a breaking change where we just don't support
TimeSpan
as the left operand at all.Then users would have to cast explicitly, or for multiplication just reverse the operands.
This would affect 13 operators:
Of which only 6 are used in tests so I assume are supported in v5: