-
Notifications
You must be signed in to change notification settings - Fork 70
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
Fixes xunit/xunit#2798: xUnit2007 code fix leads to CS8920 compiler error #167
Conversation
Does not work when adding extra abstraction layer:
|
Thanks! I assume the language preview features used here are all coming in C# 12? If so, then I'll just wait until C# 12 is released to add this. Should only be a few |
It appears this feature is not in C# 12, as it's still open: dotnet/csharplang#4436 |
@bradwilson This feature has already been introduced in C# 11, not C# 12. I have no idea why the proposal is still open. See https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/static-virtual-interface-members and https://github.com/dotnet/csharplang/blob/main/proposals/csharp-11.0/static-abstracts-in-interfaces.md |
Note that this is with .NET SDK 8 and C# 12. |
Maybe it's runtime-dependent? |
The target framework in that screenshot is .NET 6. You set it to at least .NET 7 in order for it to work. |
Thanks! |
Resolves #2798