From 754a716ff8eaae53f336670f853124954c512b8e Mon Sep 17 00:00:00 2001 From: Ravi Chande Date: Fri, 30 Sep 2016 08:07:59 -0700 Subject: [PATCH] Speculatively bind names as expressions to show MyForms intellisense. --- .../Recommendations/VisualBasicRecommendationService.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Workspaces/VisualBasic/Portable/Recommendations/VisualBasicRecommendationService.vb b/src/Workspaces/VisualBasic/Portable/Recommendations/VisualBasicRecommendationService.vb index 4200ffddde4..ca2740fc495 100644 --- a/src/Workspaces/VisualBasic/Portable/Recommendations/VisualBasicRecommendationService.vb +++ b/src/Workspaces/VisualBasic/Portable/Recommendations/VisualBasicRecommendationService.vb @@ -247,6 +247,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Recommendations Dim leftHandTypeInfo = context.SemanticModel.GetTypeInfo(leftExpression, cancellationToken) Dim leftHandSymbolInfo = context.SemanticModel.GetSymbolInfo(leftExpression, cancellationToken) + ' GitHub #9087: Try to speculatively bind a type as an expression for My namespace + If leftHandTypeInfo.Type IsNot Nothing AndAlso leftHandSymbolInfo.Symbol Is leftHandTypeInfo.Type Then + leftHandSymbolInfo = context.SemanticModel.GetSpeculativeSymbolInfo(context.Position, node, SpeculativeBindingOption.BindAsExpression) + End If + Dim excludeInstance = False Dim excludeShared = True ' do not show shared members by default Dim useBaseReferenceAccessibility = False -- GitLab