Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Jason5Lee opened this issue Nov 22, 2024 · 0 comments
Open

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

Jason5Lee opened this issue Nov 22, 2024 · 0 comments
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@Jason5Lee
Copy link

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.
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant