Skip to content

Commit

Permalink
fix microsoft#792, find all references on an imported member shows th…
Browse files Browse the repository at this point in the history
…e definition in the reference list
  • Loading branch information
dino committed Apr 12, 2016
1 parent e5102f1 commit b4b80fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion Python/Product/Analysis/Analyzer/DDG.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 0 additions & 3 deletions Python/Tests/Analysis/AnalysisTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit b4b80fd

Please sign in to comment.