Dictionary expressions: support concrete target types that do not use [CollectionBuilder]
#77476
+1,288
−396
Build Analysis / Build Analysis
failed
Mar 10, 2025 in 0s
.NET Result Analysis
Details
Tip
To unconditionally bypass the build analysis check (turn it green), you can use the escape mechanism feature. The completion time may vary, potentially taking several minutes, depending on the build analysis workload at the moment.
Build Failures
roslyn-CI / Unix_Debug_CoreClr / Test_Linux_Debug / Test
[ 🚧 Report infrastructure issue] [ 📄 Report repository issue]-
❌Bash failed with error: 1
-
❌Bash exited with return code: 1
roslyn-CI / Correctness / Correctness_Analyzers / Build with analyzers
[ 🚧 Report infrastructure issue] [ 📄 Report repository issue]-
❌src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs(6658,34): error IDE0060: Remove unused parameter 'diagnostics' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0060)
roslyn-CI / Correctness / Correctness_Bootstrap_Build_Default / Build - Validate Correctness
[ 🚧 Report infrastructure issue] [ 📄 Report repository issue]-
❌artifacts\bootstrap\ci-bootstrap\tasks\net472\Microsoft.CSharp.Core.targets(84,5): error : Compiler request rejected: Error reading response: Reached end of stream before end of read.
-
❌artifacts\bootstrap\ci-bootstrap\tasks\net472\Microsoft.CSharp.Core.targets(84,5): error : Compiler request rejected: Error writing build request: Pipe is broken.
-
❌artifacts\obj\Microsoft.CodeAnalysis.Compilers.Setup.arm64\Release\net472\Microsoft.CodeAnalysis.Compilers.arm64.swr(17,2): error SWIX1108: Could not find file at path: D:\a\_work\1\s\artifacts\bin\csc-arm64\Release\net472\Microsoft.DiaSymReader.Native.amd64.dll.
- ❌ 1 more errors on this task
Test Failures (222 tests failed)
🔹 [All failing tests from roslyn-CI]
- Test_Windows_CoreClr_Release_Windows.10.Amd64.Open
- Test_Windows_Desktop_Release_32_Windows.10.Amd64.Open
- Test_Windows_CoreClr_IOperation_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_UsedAssemblies_Debug_Windows.10.Amd64.Open
- Test_Windows_Desktop_Debug_64_Windows.10.Amd64.Open
- Test_Windows_Desktop_Spanish_Release_64_Windows.10.Amd64.Server2022.ES.Open
- Test_Linux_Debug_Ubuntu.2004.Amd64.Open
- Test_Windows_CoreClr_Release_Windows.10.Amd64.Open
- Test_Windows_Desktop_Release_32_Windows.10.Amd64.Open
- Test_Windows_CoreClr_IOperation_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_UsedAssemblies_Debug_Windows.10.Amd64.Open
- Test_Windows_Desktop_Debug_64_Windows.10.Amd64.Open
- Test_Windows_Desktop_Spanish_Release_64_Windows.10.Amd64.Server2022.ES.Open
- Test_Linux_Debug_Ubuntu.2004.Amd64.Open
- Test_Windows_CoreClr_Release_Windows.10.Amd64.Open
- Test_Windows_Desktop_Release_32_Windows.10.Amd64.Open
- Test_Windows_CoreClr_IOperation_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_UsedAssemblies_Debug_Windows.10.Amd64.Open
- Test_Windows_Desktop_Debug_64_Windows.10.Amd64.Open
- Test_Windows_Desktop_Spanish_Release_64_Windows.10.Amd64.Server2022.ES.Open
- Test_Linux_Debug_Ubuntu.2004.Amd64.Open
- Exception Message
Expected: Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "x").WithArguments("MyCollection<int?>.Add(int?[])").WithLocation(7, 33), Diagnostic(ErrorCode.ERR_BadArgType, "x").WithArguments("1", "int", "int?[]").WithLocation(7, 33), Diagnostic(ErrorCode.ERR_BadArgType, "..y").WithArguments("1", "int", "int?[]").WithLocation(7, 36), Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "y").WithArguments("MyCollection<int?>.Add(int?[])").WithLocation(7, 38) Actual: // (7,33): error CS1950: The best overloaded Add method 'MyCollection<int?>.Add(int?[])' for the collection initializer has some invalid arguments // MyCollection<int?> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "x").WithArguments("MyCollection<int?>.Add(int?[])").WithLocation(7, 33), // (7,33): error CS1503: Argument 1: cannot convert from 'int' to 'int?[]' // MyCollection<int?> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgType, "x").WithArguments("1", "int", "int?[]").WithLocation(7, 33), // (7,36): error CS1950: The best overloaded Add method 'MyCollection<int?>.Add(int?[])' for the collection initializer has some invalid arguments // MyCollection<int?> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "..y").WithArguments("MyCollection<int?>.Add(int?[])").WithLocation(7, 36), // (7,36): error CS1503: Argument 1: cannot convert from 'int' to 'int?[]' // MyCollection<int?> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgType, "..y").WithArguments("1", "int", "int?[]").WithLocation(7, 36) Diff: ++> Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "..y").WithArguments("MyCollection<int?>.Add(int?[])").WithLocation(7, 36) --> Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "y").WithArguments("MyCollection<int?>.Add(int?[])").WithLocation(7, 38)
- CallStack
at Microsoft.CodeAnalysis.DiagnosticExtensions.Verify(IEnumerable`1 actual, DiagnosticDescription[] expected, Boolean errorCodeOnly) in /_/src/Compilers/Test/Core/Diagnostics/DiagnosticExtensions.cs:line 99 at Microsoft.CodeAnalysis.DiagnosticExtensions.VerifyEmitDiagnostics[TCompilation](TCompilation c, DiagnosticDescription[] expected) in /_/src/Compilers/Test/Core/Diagnostics/DiagnosticExtensions.cs:line 373 at Microsoft.CodeAnalysis.CSharp.UnitTests.CollectionExpressionTests.AddMethod_04B() in /_/src/Compilers/CSharp/Test/Emit3/Semantics/CollectionExpressionTests.cs:line 40207 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
- Test_Windows_CoreClr_Release_Windows.10.Amd64.Open
- Test_Windows_Desktop_Release_32_Windows.10.Amd64.Open
- Test_Windows_CoreClr_IOperation_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_UsedAssemblies_Debug_Windows.10.Amd64.Open
- Test_Windows_Desktop_Debug_64_Windows.10.Amd64.Open
- Test_Windows_Desktop_Spanish_Release_64_Windows.10.Amd64.Server2022.ES.Open
- Test_Linux_Debug_Ubuntu.2004.Amd64.Open
- Exception Message
Expected: Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "x").WithArguments("MyCollection<int>.Add(string)").WithLocation(8, 32), Diagnostic(ErrorCode.ERR_BadArgType, "x").WithArguments("1", "int", "string").WithLocation(8, 32), Diagnostic(ErrorCode.ERR_BadArgType, "..y").WithArguments("1", "int", "string").WithLocation(8, 35), Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "y").WithArguments("MyCollection<int>.Add(string)").WithLocation(8, 37) Actual: // (8,32): error CS1950: The best overloaded Add method 'MyCollection<int>.Add(string)' for the collection initializer has some invalid arguments // MyCollection<int> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "x").WithArguments("MyCollection<int>.Add(string)").WithLocation(8, 32), // (8,32): error CS1503: Argument 1: cannot convert from 'int' to 'string' // MyCollection<int> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgType, "x").WithArguments("1", "int", "string").WithLocation(8, 32), // (8,35): error CS1950: The best overloaded Add method 'MyCollection<int>.Add(string)' for the collection initializer has some invalid arguments // MyCollection<int> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "..y").WithArguments("MyCollection<int>.Add(string)").WithLocation(8, 35), // (8,35): error CS1503: Argument 1: cannot convert from 'int' to 'string' // MyCollection<int> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgType, "..y").WithArguments("1", "int", "string").WithLocation(8, 35) Diff: ++> Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "..y").WithArguments("MyCollection<int>.Add(string)").WithLocation(8, 35) --> Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "y").WithArguments("MyCollection<int>.Add(string)").WithLocation(8, 37)
- CallStack
at Microsoft.CodeAnalysis.DiagnosticExtensions.Verify(IEnumerable`1 actual, DiagnosticDescription[] expected, Boolean errorCodeOnly) in /_/src/Compilers/Test/Core/Diagnostics/DiagnosticExtensions.cs:line 99 at Microsoft.CodeAnalysis.DiagnosticExtensions.VerifyEmitDiagnostics[TCompilation](TCompilation c, DiagnosticDescription[] expected) in /_/src/Compilers/Test/Core/Diagnostics/DiagnosticExtensions.cs:line 373 at Microsoft.CodeAnalysis.CSharp.UnitTests.CollectionExpressionTests.AddMethod_07() in /_/src/Compilers/CSharp/Test/Emit3/Semantics/CollectionExpressionTests.cs:line 40399 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
- Test_Windows_CoreClr_Release_Windows.10.Amd64.Open
- Test_Windows_Desktop_Release_32_Windows.10.Amd64.Open
- Test_Windows_CoreClr_IOperation_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_Debug_Windows.10.Amd64.Open
- Test_Windows_CoreClr_UsedAssemblies_Debug_Windows.10.Amd64.Open
- Test_Windows_Desktop_Debug_64_Windows.10.Amd64.Open
- Test_Windows_Desktop_Spanish_Release_64_Windows.10.Amd64.Server2022.ES.Open
- Test_Linux_Debug_Ubuntu.2004.Amd64.Open
- Exception Message
Expected: Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "x").WithArguments("MyCollection<object>.Add(string)").WithLocation(7, 35), Diagnostic(ErrorCode.ERR_BadArgType, "x").WithArguments("1", "object", "string").WithLocation(7, 35), Diagnostic(ErrorCode.ERR_BadArgType, "..y").WithArguments("1", "object", "string").WithLocation(7, 38), Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "y").WithArguments("MyCollection<object>.Add(string)").WithLocation(7, 40) Actual: // (7,35): error CS1950: The best overloaded Add method 'MyCollection<object>.Add(string)' for the collection initializer has some invalid arguments // MyCollection<object> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "x").WithArguments("MyCollection<object>.Add(string)").WithLocation(7, 35), // (7,35): error CS1503: Argument 1: cannot convert from 'object' to 'string' // MyCollection<object> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgType, "x").WithArguments("1", "object", "string").WithLocation(7, 35), // (7,38): error CS1950: The best overloaded Add method 'MyCollection<object>.Add(string)' for the collection initializer has some invalid arguments // MyCollection<object> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "..y").WithArguments("MyCollection<object>.Add(string)").WithLocation(7, 38), // (7,38): error CS1503: Argument 1: cannot convert from 'object' to 'string' // MyCollection<object> z = [x, ..y]; Diagnostic(ErrorCode.ERR_BadArgType, "..y").WithArguments("1", "object", "string").WithLocation(7, 38) Diff: ++> Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "..y").WithArguments("MyCollection<object>.Add(string)").WithLocation(7, 38) --> Diagnostic(ErrorCode.ERR_BadArgTypesForCollectionAdd, "y").WithArguments("MyCollection<object>.Add(string)").WithLocation(7, 40)
- CallStack
at Microsoft.CodeAnalysis.DiagnosticExtensions.Verify(IEnumerable`1 actual, DiagnosticDescription[] expected, Boolean errorCodeOnly) in /_/src/Compilers/Test/Core/Diagnostics/DiagnosticExtensions.cs:line 99 at Microsoft.CodeAnalysis.DiagnosticExtensions.VerifyEmitDiagnostics[TCompilation](TCompilation c, DiagnosticDescription[] expected) in /_/src/Compilers/Test/Core/Diagnostics/DiagnosticExtensions.cs:line 373 at Microsoft.CodeAnalysis.CSharp.UnitTests.CollectionExpressionTests.AddMethod_08() in /_/src/Compilers/CSharp/Test/Emit3/Semantics/CollectionExpressionTests.cs:line 40459 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
❌ Microsoft.CodeAnalysis.CSharp.UnitTests.CollectionExpressionTests.Add_ParamsArray_01 [Console] [Details] [Artifacts] [2.48% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
This is a helix work item crash with status: BadExit. To investigate look the [Console log] / navigate to [Helix Artifacts]
Failing Configurations (8)
❌ Microsoft.CodeAnalysis.CSharp.UnitTests.CollectionExpressionTests.Add_ParamsCollection_01 [Console] [Details] [Artifacts] [2.48% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
This is a helix work item crash with status: BadExit. To investigate look the [Console log] / navigate to [Helix Artifacts]
Failing Configurations (8)
❌ Microsoft.CodeAnalysis.CSharp.UnitTests.CollectionExpressionTests.AddMethod_04B [Console] [Details] [Artifacts] [1.01% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
Failing Configurations (8)
❌ Microsoft.CodeAnalysis.CSharp.UnitTests.CollectionExpressionTests.AddMethod_07 [Console] [Details] [Artifacts] [1.01% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
Failing Configurations (8)
❌ Microsoft.CodeAnalysis.CSharp.UnitTests.CollectionExpressionTests.AddMethod_08 [Console] [Details] [Artifacts] [1.01% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
Failing Configurations (8)
Loading