-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSHARP-5836: Support new Reverse with array overload introduced by .NET 10 #1848
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
base: main
Are you sure you want to change the base?
Conversation
| // static constructor | ||
| static EnumerableMethod() | ||
| { | ||
| #if NET10_OR_GREATER |
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.
This #if def does not make any sense to me. We do not have any target defining it, so the code is never going to be executed.
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.
It makes sense if you consider that very soon we will be adding net10 as a target.
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.
Probably, but for now it's a dead-code. Why do we need to add this code to repo NOW?
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.
I've came across this question in CSHARP-5665 wanting to use CommonPrefixLength. I decided not to have a dead and untested code, and will note it as a future improvement for net10 target. I suggest doing the same here.
Also we don't have an official date to support net10 yet.
| return __where.MakeGenericMethod(tsource); | ||
| } | ||
|
|
||
| #if !NET10_OR_GREATER |
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.
Same here, this code will be always included, as we have no configuration to have NET10_OR_GREATER defined.
No description provided.