提交 0fd56df3 编写于 作者: J JieCarolHu

adding test case DoNotSuggestVarForExplicitInterfaceImplementations

上级 dc5d6faa
......@@ -2209,5 +2209,34 @@ static void Main(string[] args)
delegate object GetHandler();
}", new TestParameters(options: ImplicitTypeEverywhere()));
}
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsUseExplicitType)]
[WorkItem(24262, "https://github.com/dotnet/roslyn/issues/24262")]
public async Task DoNotSuggestVarForExplicitInterfaceImplementations()
{
await TestMissingInRegularAndScriptAsync(@"
public interface ITest
{
string Value { get; }
}
public class TestInstance : ITest
{
string ITest.Value => ""Hi"";
}
public class Test
{
public TestInstance[] Instances { get; }
public void TestIt()
{
foreach ([|ITest|] test in Instances)
{
Console.WriteLine(test.Value);
}
}
}
", new TestParameters(options: ImplicitTypeEverywhere()));
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册