You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue seems to be due to some C# compiler update - the failures seem to be at places of negative testing that expects runtime failures, but we started to get compilation failures instead.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(341,6): error CS8896: 'UnmanagedCallersOnly' can only be applied to ordinary static methods or static local functions. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(341,6): error CS8896: 'UnmanagedCallersOnly' can only be applied to ordinary static methods or static local functions.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(439,6): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(439,6): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(440,48): error CS8894: Cannot use 'T' as a parameter type on a method attributed with 'UnmanagedCallersOnly'. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(440,48): error CS8894: Cannot use 'T' as a parameter type on a method attributed with 'UnmanagedCallersOnly'.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(520,10): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(520,10): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type.
Boo, but yay? Proves that the compiler is doing its job. I should be able to push up a PR later today with this fixed in the main branch. The plan of record is to move the non-C# friendly code to IL so the failure cases can be tested.
The issue seems to be due to some C# compiler update - the failures seem to be at places of negative testing that expects runtime failures, but we started to get compilation failures instead.
Log here:
https://dev.azure.com/dnceng/public/_build/results?buildId=811186&view=logs&j=db768a9e-3325-5ce3-2d52-896c40bee68a&t=59112ad9-fe58-56ee-6943-84df6f0e3f8e&l=13792
The text was updated successfully, but these errors were encountered: