提交 10b47b75 编写于 作者: R Ravi Chande 提交者: GitHub

Merge pull request #18788 from rchande/fix18787

Don't show completionlist completion after dot
......@@ -399,6 +399,26 @@ End Class
Await VerifyNoItemsExistAsync(markup)
End Function
<WorkItem(18787, "https://github.com/dotnet/roslyn/issues/18787")>
<Fact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Async Function NotAfterDot() As Task
Dim markup = <Text><![CDATA[
Public Class Program
Private Shared field1 As Integer
''' <summary>
''' </summary>
''' <completionList cref="Program"></completionList>
Public Class Program2
Public Async Function TestM() As Task
Dim obj As Program2 = Program.$$
End Sub
End Class
End Class
]]></Text>.Value
Await VerifyNoItemsExistAsync(markup)
End Function
Friend Overrides Function CreateCompletionProvider() As CompletionProvider
Return New CompletionListTagCompletionProvider()
End Function
......
......@@ -19,6 +19,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.Providers
Return SpecializedTasks.EmptyImmutableArray(Of ISymbol)()
End If
If context.TargetToken.IsKind(SyntaxKind.DotToken) Then
Return SpecializedTasks.EmptyImmutableArray(Of ISymbol)()
End If
Dim typeInferenceService = context.GetLanguageService(Of ITypeInferenceService)()
Dim inferredType = typeInferenceService.InferType(context.SemanticModel, position, objectAsDefault:=True, cancellationToken:=cancellationToken)
If inferredType Is Nothing Then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册