dotnet/roslyn

EE: "Internal error in C# compiler" reported for typeof(T?)

Ouverte

#47 648 ouverte le 12 sept. 2020

 (1 commentaire) (0 réaction) (0 personne assignée)C# (4 257 forks)batch import
Area-InteractiveBugFeature - Nullable Type ParametersInteractive-Debugginghelp wanted

Métriques du dépôt

Stars
 (20 414 étoiles)
Métriques de merge PR
 (Merge moyen 6j 17h) (256 PRs mergées en 30 j)

Description

Debug the following:

#nullable enable

class Program
{
    static void F<T, U>(T t, U u)
        where T : class
    {
        System.Diagnostics.Debugger.Break();
    }

    static void Main(string[] args)
    {
        F("", "");
    }
}

At the breakpoint, evaluate either typeof(T?) or typeof(U?) in the EE.

Result: Internal error in the C# compiler

Guide contributeur