From 4c3ef12125fe1b0e383a7ebe1103c38896f253de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D0=BD=D0=B4=D0=B0=D1=80=D0=B5=D0=B2=20=D0=98?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD?= Date: Sun, 26 Aug 2018 19:35:27 +0200 Subject: [PATCH] fix #1076 --- CodeCompletion/FindReferences.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CodeCompletion/FindReferences.cs b/CodeCompletion/FindReferences.cs index 99b614520..20a55f745 100644 --- a/CodeCompletion/FindReferences.cs +++ b/CodeCompletion/FindReferences.cs @@ -211,7 +211,7 @@ namespace CodeCompletion else ret_tn = ret_tn.FindNameInAnyOrder(_named_type_reference.names[i].name); if (ret_tn == null) break; else if (founded_scope.IsEqual(ret_tn)) - pos_list.Add(get_position(_named_type_reference)); + pos_list.Add(get_position(_named_type_reference.names[i])); } } @@ -519,7 +519,7 @@ namespace CodeCompletion IBaseScope ss = entry_scope.FindNameInAnyOrder(_type_declaration.type_name.name); if (ss == null && entry_scope is IInterfaceUnitScope && (entry_scope as IInterfaceUnitScope).ImplementationUnitScope != null) ss = (entry_scope as IInterfaceUnitScope).ImplementationUnitScope.FindNameInAnyOrder(_type_declaration.type_name.name); - if (for_refactoring && ss != null && ss.IsEqual(founded_scope) && string.Compare(ss.SymbolInfo.name, _type_declaration.type_name.name, true) == 0) + if (for_refactoring && ss != null && ss.IsEqual(founded_scope) && string.Compare(ss.SymbolInfo.name, _type_declaration.type_name.name, true) == 0 && !(ss is ITypeSynonimScope && !(founded_scope is ITypeSynonimScope))) { pos_list.Add(get_position(_type_declaration.type_name)); }