Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid compiler crash when `UsageBasedMetadataGenerationOptions.Comple…
…teTypesOnly` is specified (#106445) Fixes #106439. This is an unsupported flag that allows generating unusable metadata for type members that would have been trimmed. This is useful when troubleshooting trimming issues for people who ignore trimming warnings because it converts random `NullReferenceException` (e.g. `GetMethod` returned null and the program didn't check for it) into "Foo.Bar wasn't generated" exceptions. Because this isn't tested, we regressed this. The code that checks whether it's possible to generate the metadata for the member at all stopped working for uninstantiated generics. This check is needed to deal with invalid input IL.
- Loading branch information