dotnet/roslyn

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

開放

#47,648 建立於 2020年9月12日

 (1 則留言) (0 個反應) (0 位負責人)C# (4,257 個分叉)batch import
Area-InteractiveBugFeature - Nullable Type ParametersInteractive-Debugginghelp wanted

倉庫指標

星標
 (20,414 顆星)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 256 個 PR)

描述

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

貢獻者指南