-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
SynthesizedReadOnlyListTypeSymbol.Create - Check for MissingMetadataTypeSymbol #71330
Conversation
@@ -102,8 +102,8 @@ internal static NamedTypeSymbol Create(SourceModuleSymbol containingModule, stri | |||
DiagnosticInfo? diagnosticInfo = null; | |||
|
|||
var hasReadOnlyInterfaces = | |||
!compilation.IsTypeMissing(SpecialType.System_Collections_Generic_IReadOnlyCollection_T) | |||
&& !compilation.IsTypeMissing(SpecialType.System_Collections_Generic_IReadOnlyList_T); | |||
compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyCollection_T) is not MissingMetadataTypeSymbol && |
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.
compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyCollection_T) is not MissingMetadataTypeSymbol &&
It looks like we are fixing a real bug, but not adding any unit-tests. I think we should add a unit-test that makes the problem observable. I.e. a test that fails without the fix. #Closed
@AlekseyTs @dotnet/roslyn-compiler this is ready for review. thanks. |
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.
LGTM (commit 4)
@dotnet/roslyn-compiler For the second review |
Thanks @alrz for the contribution. |
* upstream/main: (79 commits) SynthesizedReadOnlyListTypeSymbol.Create - Check for MissingMetadataTypeSymbol (dotnet#71330) Add comment Make obsolete Update src/Features/CSharp/Portable/SignatureHelp/LightweightOverloadResolution.cs Update tests Update tests Update tests Raw strings File scoped namespaces Add tests Add index check Add tests Docs Simplify Move to top level type Finalize Simplify In progress In progress Do not call Unsubst if it is not available due to argument processing (dotnet#71282) ...
Fix #71297