Skip to content
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

.NET 7 build updates #270 #271

Closed
wants to merge 1 commit into from

Conversation

fuzzyoctopus
Copy link

@fuzzyoctopus fuzzyoctopus commented Dec 20, 2022

Sum and Average have new type parameter options that cause issues at runtime. Simple bypass operation that should only affect .NET 7 compilation. Affects #270

Sum and Average have new type parameter options that cause issues at runtime. Simple bypass operation that should only affect .NET 7 compilation
Comment on lines -2317 to +2322
var genericMethod = MakeGenericMethod(method);
MethodInfo genericMethod;
#if NET7_0_OR_GREATER
genericMethod = TryMakeGenericMethod(method);
#else
genericMethod = MakeGenericMethod(method);
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simply replace MakeGenericMethod with TryMakeGenericMethod, and avoid a compilation target check.

Comment on lines +2402 to +2405
#if NET7_0_OR_GREATER
if (methodGenericParameters.Length != methodActualParameters.Length)
return extractedGenericTypes;
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this situation can occur. In which situation did you see it?

@metoule
Copy link
Contributor

metoule commented Feb 11, 2023

Closed in favor of #274

@metoule metoule closed this Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants