From b4b80fda46f36136f915ee564611fc013a6b1868 Mon Sep 17 00:00:00 2001 From: dino Date: Tue, 12 Apr 2016 16:20:01 -0700 Subject: [PATCH] fix #792, find all references on an imported member shows the definition in the reference list --- Python/Product/Analysis/Analyzer/DDG.cs | 2 +- Python/Tests/Analysis/AnalysisTest.cs | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Python/Product/Analysis/Analyzer/DDG.cs b/Python/Product/Analysis/Analyzer/DDG.cs index 59b8060286..406b8c7008 100644 --- a/Python/Product/Analysis/Analyzer/DDG.cs +++ b/Python/Product/Analysis/Analyzer/DDG.cs @@ -226,7 +226,7 @@ private void WalkFromImportWorker(NameExpression node, IModule userMod, string i bool addRef = node.Name != "*"; - var variable = Scope.CreateVariable(node, _unit, saveName, addRef); + var variable = Scope.CreateVariable(node, _unit, saveName, false); bool added = false; if (userMod != null) { added = variable.AddTypes(_unit, userMod.GetModuleMember(node, _unit, impName, addRef, Scope, saveName)); diff --git a/Python/Tests/Analysis/AnalysisTest.cs b/Python/Tests/Analysis/AnalysisTest.cs index 0f45b6c9b2..0b6d224f7e 100644 --- a/Python/Tests/Analysis/AnalysisTest.cs +++ b/Python/Tests/Analysis/AnalysisTest.cs @@ -2561,9 +2561,6 @@ print abc new VariableLocation(19, 21, VariableType.Definition), new VariableLocation(20, 28, VariableType.Definition), - new VariableLocation(19, 21, VariableType.Reference), - new VariableLocation(20, 28, VariableType.Reference), - new VariableLocation(22, 8, VariableType.Reference), new VariableLocation(23, 10, VariableType.Reference), new VariableLocation(24, 11, VariableType.Reference),