Implicit cast between Duration and TimeSpan - #1365
Conversation
Muximize
commented
Feb 19, 2024
Hmm, these failing CI tests pass on my machine. Any guidance? |
angularsen
commented
Feb 23, 2024
@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. |
angularsen
commented
Feb 23, 2024
As for the failing test case, that was my bad in a previous merged PR. |
Muximize
commented
Feb 24, 2024
I completely removed Also removed some tests for |
angularsen
left a comment
There was a problem hiding this comment.
Another mistake on my part, I'll fix it.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
See #1354 (comment)
One issue is that the operator overloads only work when
TimeSpanis 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
TimeSpanas 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: