From f58e6b56035a39bd66588d4778c04e876058ca5a 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: Sat, 10 Jun 2017 23:46:17 +0200 Subject: [PATCH] bug fix #424 --- CodeCompletion/DomSyntaxTreeVisitor.cs | 7 ++++++- CodeCompletion/SymTable.cs | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CodeCompletion/DomSyntaxTreeVisitor.cs b/CodeCompletion/DomSyntaxTreeVisitor.cs index 3563d462b..2c942fc15 100644 --- a/CodeCompletion/DomSyntaxTreeVisitor.cs +++ b/CodeCompletion/DomSyntaxTreeVisitor.cs @@ -1472,7 +1472,12 @@ namespace CodeCompletion ps.is_static = _function_header.class_keyword; if (add_doc_from_text && this.converter.controller.docs != null && this.converter.controller.docs.ContainsKey(_function_header)) ps.AddDocumentation(this.converter.controller.docs[_function_header]); - if (is_proc_realization) ps.already_defined = true; + if (is_proc_realization) + { + ps.already_defined = true; + if (ps.loc == null) + ps.loc = loc; + } else { ps.loc = loc; diff --git a/CodeCompletion/SymTable.cs b/CodeCompletion/SymTable.cs index 4a3d8ee1d..9453bb13d 100644 --- a/CodeCompletion/SymTable.cs +++ b/CodeCompletion/SymTable.cs @@ -1883,6 +1883,8 @@ namespace CodeCompletion return this; ProcScope instance = new ProcScope(this.name, this.topScope, this.is_constructor); instance.is_extension = this.is_extension; + instance.loc = this.loc; + instance.body_loc = this.body_loc; instance.parameters = new List(this.parameters.Count); int i = 0; foreach (ElementScope parameter in this.parameters)