提交 2ed1b8bf 编写于 作者: C Cyrus Najmabadi

Add comment

上级 9adebb61
......@@ -3070,8 +3070,13 @@ public async Task OverrideInRecordWithExplicitOverriddenMember()
[WorkItem(47973, "https://github.com/dotnet/roslyn/issues/47973")]
public async Task NoCloneInOverriddenRecord()
{
// Currently WellKnownMemberNames.CloneMethodName is not public, so we can't reference it directly. We
// could hardcode in the value "<Clone>$", however if the compiler ever changed the name and we somehow
// started showing it in completion, this test would continue to pass. So this allows us to at least go
// back and explicitly validate this scenario even in that event.
var cloneMemberName = (string)typeof(WellKnownMemberNames).GetField("CloneMethodName", BindingFlags.NonPublic | BindingFlags.Static).GetValue(null);
Assert.Equal("<Clone>$", cloneMemberName);
await VerifyItemIsAbsentAsync(@"
record Base();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册