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 seems that IronPython does't support default value for structs, such as default(CancellationToken)
The text was updated successfully, but these errors were encountered:
bnuzhouwei
changed the title
Default value for default(CancellationToken)
Support default value for structs, such as default(CancellationToken)
May 25, 2022
Thanks for the report, I managed to reproduce this with something like:
publicvoidTest(CancellationTokentoken=default);
A potential fix would be to add some sort of check to DefaultArgBuilder.ToExpression in the DLR (don't think this is correct but something similar may work):
Thanks, can we do this without modified the IronPython Souce Code?
I don't have any workaround, I think you will have to explicitly pass in the argument CountDocuments[BsonDocument]("collection", cancellationToken=CancellationToken.None).
Runtime: NET6.0
IronPython: 2.7.11
In mongodb, there are many methods with default value as default(CancellationToken)
but in IronPython, when we call the method:
got
I seems that IronPython does't support default value for structs, such as default(CancellationToken)
The text was updated successfully, but these errors were encountered: