Conversation
…ce-level extensions Co-authored-by: jcouv <12466233+jcouv@users.noreply.github.com>
|
|
||
| NamedTypeSymbol extension = extensionMember.ContainingType; | ||
| if (extension.ExtensionParameter is not { } extensionParameter || extension.ContainingType.Arity != 0) | ||
| if (extension.ExtensionParameter is not { } extensionParameter || extension.ContainingType?.Arity != 0) |
There was a problem hiding this comment.
I checked usages of ContainingType in context of usages of GetIsNewExtensionMember, ExtensionParameter and IsExtension.
I didn't find any problem, but added a couple of tests to ensure the null checks are covered.
There was a problem hiding this comment.
I checked usages of
ContainingTypein context of usages ofGetIsNewExtensionMember,ExtensionParameterandIsExtension. I didn't find any problem, but added a couple of tests to ensure the null checks are covered.
I thought GetIsNewExtensionMember got renamed. Did you use new name for the check?
There was a problem hiding this comment.
The PR was forked before the rename. I refreshed the PR and took another look (now for IsExtensionBlockMember()). Thanks
There was a problem hiding this comment.
FWIW, for other APIs, I don't think it's worthwhile to do another pass. We didn't change extension logic that much in the last 3 weeks.
|
Done with review pass (commit 3) #Closed |
|
Done with review pass (commit 4) |
…erspecified-generic-extension
|
/backport to release/dev18.0 |
|
Started backporting to |
|
@jcouv backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Creating an empty commit: Initial plan
Applying: Fix null reference in CheckUnderspecifiedGenericExtension for namespace-level extensions
Applying: Fixup test
Applying: Address feedback
error: sha1 information is lacking or useless (src/Compilers/CSharp/Test/Emit3/Semantics/ExtensionTests.cs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0004 Address feedback
Error: The process '/usr/bin/git' failed with exit code 128 |
…amespace-level extensions (dotnet#80929) Fixes dotnet#80829
Fixes #80829