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

贡献者指南