@@ -12859,5 +12859,69 @@ internal class Program
1285912859 Await state.AssertCompletionItemsContain( "customer" , displayTextSuffix:= "" )
1286012860 End Using
1286112861 End Function
12862+
12863+ <WpfTheory, CombinatorialData>
12864+ <WorkItem( "https://github.com/dotnet/roslyn/issues/5399" )>
12865+ Public Async Function TestSpeculativeTInExtension(showCompletionInArgumentLists As Boolean ) As Task
12866+ Using state = TestStateFactory.CreateCSharpTestState(
12867+ <Document>
12868+ static class C
12869+ {
12870+ extension(Customer customer)
12871+ {
12872+ $$
12873+ }
12874+ }
12875+ </Document>,
12876+ showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersionExtensions.CSharpNext)
12877+
12878+ state.SendInvokeCompletionList()
12879+ Await state.AssertCompletionItemsContain( "T" , displayTextSuffix:= "" )
12880+ End Using
12881+ End Function
12882+
12883+ <WpfTheory, CombinatorialData>
12884+ <WorkItem( "https://github.com/dotnet/roslyn/issues/5399" )>
12885+ Public Async Function TestReturnSymbolInExtension1(showCompletionInArgumentLists As Boolean ) As Task
12886+ Using state = TestStateFactory.CreateCSharpTestState(
12887+ <Document>
12888+ using System ;
12889+
12890+ static class C
12891+ {
12892+ extension(Customer customer)
12893+ {
12894+ $$
12895+ }
12896+ }
12897+ </Document>,
12898+ showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersionExtensions.CSharpNext)
12899+
12900+ state.SendInvokeCompletionList()
12901+ Await state.AssertCompletionItemsContain( "String" , displayTextSuffix:= "" )
12902+ End Using
12903+ End Function
12904+
12905+ <WpfTheory, CombinatorialData>
12906+ <WorkItem( "https://github.com/dotnet/roslyn/issues/5399" )>
12907+ Public Async Function TestReturnSymbolInExtension2(showCompletionInArgumentLists As Boolean ) As Task
12908+ Using state = TestStateFactory.CreateCSharpTestState(
12909+ <Document>
12910+ using System ;
12911+
12912+ static class C
12913+ {
12914+ extension(Customer customer)
12915+ {
12916+ public $$
12917+ }
12918+ }
12919+ </Document>,
12920+ showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersionExtensions.CSharpNext)
12921+
12922+ state.SendInvokeCompletionList()
12923+ Await state.AssertCompletionItemsContain( "String" , displayTextSuffix:= "" )
12924+ End Using
12925+ End Function
1286212926 End Class
1286312927End Namespace
0 commit comments