未验证 提交 670656e0 编写于 作者: I Ivan Basov 提交者: GitHub

EnC for nullables editing tests with lambdas (#37598)

上级 0a265bb5
......@@ -2761,6 +2761,42 @@ void F()
Diagnostic(RudeEditKind.ChangingLambdaReturnType, "a", CSharpFeaturesResources.lambda));
}
[Fact]
public void Lambdas_Update_Signature_Nullable()
{
var src1 = @"
using System;
class C
{
void G1(Func<string, string> f) {}
void G2(Func<string?, string?> f) {}
void F()
{
G1(a => a);
}
}
";
var src2 = @"
using System;
class C
{
void G1(Func<string, string> f) {}
void G2(Func<string?, string?> f) {}
void F()
{
G2(a => a);
}
}
";
var edits = GetTopEdits(src1, src2);
edits.VerifySemanticDiagnostics();
}
[Fact]
public void Lambdas_Update_Signature_SyntaxOnly1()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册