Remove warning from 'in enum' extension methods#80708
Conversation
|
@jjonescz Would you maybe have a moment to take a look? |
src/Compilers/CSharp/Portable/Symbols/Source/SourceOrdinaryMethodSymbol.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Portable/Symbols/Source/SourceOrdinaryMethodSymbol.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenInParametersTests.cs
Outdated
Show resolved
Hide resolved
|
We should add similar set of tests for new extension blocks. Should be fine to do that in the same files #Closed |
I think we should simply go ahead and fix extension members too. Extension members and classic extension methods should be compatible. In other words, it should be possible to convert a classic extension method to an instance method of an extension block. I think the spec mentions the compatibility requirement. The fact that the logic is duplicated is not a coincidence. #Closed |
|
Done with review pass (commit 9) #Closed |
src/Compilers/CSharp/Test/Symbol/Symbols/ExtensionMethodTests.cs
Outdated
Show resolved
Hide resolved
|
Done with review pass (commit 20) |
|
Done with review pass (commit 23) |
|
@dotnet/roslyn-compiler For a second review on a community PR |
|
Would it be ready to merge? |
|
Thanks @stbau04! |
Fixes #73746
Probably also some changes are wanted for the new extension members (as they currently have the same check as modified in this pr and there is nothing in the proposal that would hint for that), gonne create an issue as soon as this pr is closed/merged
Also gonna create discussions on the csharplang repo regarding the restrictions for type parameters that are constrained to struct and
ref readonly, both as discussed in the issue(to avoid potential duplicate discussions i would create both after this is finished)