Skip to content

Compiler Crash on Equality Comparison of a Tuple Casted from dynamic #76028

Open
@Jason5Lee

Description

@Jason5Lee

Version Used: .NET 9.0.0

Steps to Reproduce:

  1. Compile the following C# code (SharpLab Link):
    • The code involves casting a dynamic value to a tuple and performing an equality comparison on another tuple.
public class C {
    public static bool Test(dynamic o) =>
        (((int, int))o) == (2, 3);
}

Expected Behavior: The compiler compiles the code without crashes.

Actual Behavior:

  • The compilation process fails in Visual Studio with the error:

    "csc.exe" exited with code -2146232797

  • Additional details, including a stack trace, are available in the linked SharpLab page.

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions