From 7a1b680fa7ec7cd923a19f47dce8145a35e7a002 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: Tue, 23 Apr 2019 22:00:35 +0200 Subject: [PATCH] fix pascalabcnet/pascalabcnetide#104 --- CodeCompletion/SymTable.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CodeCompletion/SymTable.cs b/CodeCompletion/SymTable.cs index 7c274f178..adaf16cc0 100644 --- a/CodeCompletion/SymTable.cs +++ b/CodeCompletion/SymTable.cs @@ -3980,8 +3980,6 @@ namespace CodeCompletion { if (members != null && !is_static) { - bool has_def_constr = false; - foreach (SymScope ss in members) { ProcScope ps = ss as ProcScope; @@ -3993,10 +3991,14 @@ namespace CodeCompletion ProcScope other_constr = this.FindNameOnlyInType("Create") as ProcScope; ProcScope constr = new ProcScope("Create", this, true); - constr.si.acc_mod = access_modifer.public_modifer; + if (other_constr != null && other_constr.declaringType == this) + constr.si.acc_mod = access_modifer.protected_modifer; + else + constr.si.acc_mod = access_modifer.public_modifer; //constr.head_loc = this.loc; //constr.loc = this.loc; constr.is_constructor = true; + constr.Complete(); constr.nextProc = other_constr; members.Insert(0, constr);