Skip to content

Ambiguous decompiled operator overload / type argument list #1959

Description

@sgkoishi

https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-7.0/pattern-matching#changes-to-syntactic-disambiguation
The generic type arguments may be ambiguous.
Demo on SharpLab

        int num = 0;
        int num2 = 0;
        D d = null;
        F((num < num2), d > (d ?? d));

The last line was decompiled to F(num < num2, d > (d ?? d));(bracket missing), which num2, d will be considered as generic type arguments of num, and d ?? d as parameter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C#DecompilerThe decompiler engine itselfOutputOutput code formatting; hyperlinks/tooltips on output code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions