Test CollectionBuilder_MissingInt32 hits an assertion failure when lowering layer does not use int32
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
After fixing #72566 we hit an assertion failure in the following test.
https://github.com/dotnet/roslyn/blob/1bf23610b41c148e1cf2d4144d0dbd6714b1f145/src/Compilers/CSharp/Test/Emit2/Semantics/CollectionExpressionTests.cs#L17976-L18021
I think this is simply exposing an existing bug (CompilationRelaxationsAttribute is not giving use site diagnostics for missing int in the correct layer).
```
Message:
System.InvalidOperationException : Use site errors should have been checked ahead of time (type int).
Stack Trace:
ThrowingTraceListener.Fail(String message, String detailMessage) line 26
TraceInternal.Fail(String message, String detailMessage)
Debug.Fail(String message, String detailMessage)
SourceAssemblySymbol.AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ArrayBuilder`1& attributes) line 1969
```
Contributor guide
Assessment
This issue has not been assessed yet.