提交 fd6ec7f7 编写于 作者: R Ravi Chande

Merge pull request #7886 from rchande/fix3290

Fix #3290
......@@ -7052,5 +7052,21 @@ End Module
]]></code>.Value
Await VerifyItemExistsAsync(text, "Length")
End Function
<WorkItem(3290, "https://github.com/dotnet/roslyn/issues/3290")>
<Fact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Async Function TestDotAfterArray() As Task
Dim text =
<code><![CDATA[
Module Module1
Sub Main()
Dim x = {1}.$$
End Sub
End Module
]]></code>.Value
Await VerifyItemExistsAsync(text, "Length")
End Function
End Class
End Namespace
......@@ -219,7 +219,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Recommendations
Dim inNameOfExpression = node.IsParentKind(SyntaxKind.NameOfExpression)
Dim container = DirectCast(leftHandTypeInfo.Type, INamespaceOrTypeSymbol)
If leftHandTypeInfo.Type.IsErrorType AndAlso leftHandSymbolInfo.Symbol IsNot Nothing Then
If container Is Nothing AndAlso TypeOf (leftHandTypeInfo.ConvertedType) Is IArrayTypeSymbol Then
container = DirectCast(leftHandTypeInfo.ConvertedType, INamespaceOrTypeSymbol)
End If
If container.IsErrorType() AndAlso leftHandSymbolInfo.Symbol IsNot Nothing Then
' TODO remove this when 531549 which causes leftHandTypeInfo to be an error type is fixed
container = leftHandSymbolInfo.Symbol.GetSymbolType()
End If
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册