Open
Description
We are encountering build errors when building with the latest internal compiler in source-build. It gives error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type. It also gives several CS8500 warnings.
Here is a link to the internal build failure: https://dev.azure.com/dnceng/internal/_build/results?buildId=2004504&view=logs&j=2d3d5aef-8fa7-5ecd-0b12-6aebb43b720c&t=9b89cfd5-8b4c-5686-5153-a3d2912d1018&l=25741 (internal MS link)
/tarball/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs(329,26): error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('ByReference') [/tarball/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj]
Here is a link to the CS0208 Documentation.
Is there a simple fix for this that we can implement as a patch ASAP?