From 9400fa52f86a22cdbf855e218177f5566fd06fd3 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Tue, 6 Jan 2026 19:10:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=B5=D1=80=D0=BD=D1=83=D0=BB=20RebuildP?= =?UTF-8?q?ython?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 2 +- Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TreeConverter/SymbolTable/DSST/SymbolTable.cs | 3 +++ .../TreeConversion/syntax_tree_visitor.cs | 6 ++++++ _GenerateAllSetups.bat | 16 ++++++++-------- 7 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 1f59d7cd4..19e72651b 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "11"; public const string Build = "0"; - public const string Revision = "3731"; + public const string Revision = "3733"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 2d0bdb114..5223bc4fb 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=11 -%REVISION%=3731 +%REVISION%=3733 %COREVERSION%=0 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 2d52b4b1c..74618e375 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.11.0.3731 +3.11.0.3733 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 728e64c7a..9a2e34050 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.11.0.3731' +!define VERSION '3.11.0.3733' diff --git a/TreeConverter/SymbolTable/DSST/SymbolTable.cs b/TreeConverter/SymbolTable/DSST/SymbolTable.cs index 488886003..427f035cd 100644 --- a/TreeConverter/SymbolTable/DSST/SymbolTable.cs +++ b/TreeConverter/SymbolTable/DSST/SymbolTable.cs @@ -6,6 +6,7 @@ using PascalABCCompiler.TreeConverter; using System.Collections.Generic; using SymbolTable; using System.Reflection; +using PascalABCCompiler.TreeRealization; namespace PascalABCCompiler.TreeRealization { @@ -928,6 +929,8 @@ namespace SymbolTable (((to.symbol_kind == symbol_kind.sk_none) && (add.symbol_kind == symbol_kind.sk_none)) && (to.scope == add.scope)) || ((to.symbol_kind == symbol_kind.sk_overload_function) && (add.symbol_kind == symbol_kind.sk_overload_function)) + //|| // SSM 06.01.26 пробую разрешить конструктор вместе с функцией Create. Увы - select_function слаба - она только по параметрам пытается определить, а параметры у конструктора и функции Create одни и те же + //((to.symbol_kind == symbol_kind.sk_overload_function) && (add.sym_info is common_method_node cmn) && cmn.is_constructor) || ((to.symbol_kind == symbol_kind.sk_overload_procedure) && (add.symbol_kind == symbol_kind.sk_overload_procedure)) || to.sym_info != add.sym_info && (to.sym_info is PascalABCCompiler.TreeRealization.function_node || to.symbol_kind == symbol_kind.sk_overload_function) && add.sym_info is PascalABCCompiler.TreeRealization.function_node diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index a00685446..ff7c8c5a6 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -19887,6 +19887,12 @@ namespace PascalABCCompiler.TreeConverter AddError(loc, "ABSTRACT_CONSTRUCTOR_{0}_CALL", tn.name); } List sil = tn.find_in_type(default_constructor_name, context.CurrentScope); //tn.Scope); + + // SSM 06.01.26 - это позволяет учитывать только конструкторы при наличии других функций Create. К сожалению, этого недостаточно + // т.к. всё равно статическая и экземплярная Create не различаются и кидается ошибка при t.Create + // Надо это улучшать + //sil = sil.FindAll(si => si.sym_info is common_method_node cmn && cmn.is_constructor); + delete_inherited_constructors(ref sil, tn); if (sil == null) AddError(loc, "CONSTRUCTOR_NOT_FOUND"); diff --git a/_GenerateAllSetups.bat b/_GenerateAllSetups.bat index 0f2c05f1c..e240f393e 100644 --- a/_GenerateAllSetups.bat +++ b/_GenerateAllSetups.bat @@ -18,7 +18,7 @@ dotnet build -c Release --no-incremental PascalABCNET.sln cd ReleaseGenerators ..\bin\pabcnetc RebuildStandartModules.pas /rebuild -rem ..\bin\pabcnetc RebuildStandartModulesSPython.pas /rebuild +..\bin\pabcnetc RebuildStandartModulesSPython.pas @IF %ERRORLEVEL% NEQ 0 GOTO ERROR cd PABCRtl @@ -34,7 +34,7 @@ ExecHide.exe gacutil.exe /u PABCRtl ExecHide.exe gacutil.exe /i ..\bin\Lib\PABCRtl.dll ..\bin\pabcnetc RebuildStandartModules.pas /rebuild -rem ..\bin\pabcnetc RebuildStandartModulesSPython.pas /rebuild +..\bin\pabcnetc RebuildStandartModulesSPython.pas @IF %ERRORLEVEL% NEQ 0 GOTO ERROR @@ -47,12 +47,12 @@ cd ..\TestSuite ..\bin\TestRunner.exe 6 cd ..\TestSuiteAdditionalLanguages\SPythonTests -rem ..\..\bin\TestRunner.exe 1 -rem ..\..\bin\TestRunner.exe 2 -rem ..\..\bin\TestRunner.exe 3 -rem ..\..\bin\TestRunner.exe 4 -rem ..\..\bin\TestRunner.exe 5 -rem ..\..\bin\TestRunner.exe 6 +..\..\bin\TestRunner.exe 1 +..\..\bin\TestRunner.exe 2 +..\..\bin\TestRunner.exe 3 +..\..\bin\TestRunner.exe 4 +..\..\bin\TestRunner.exe 5 +..\..\bin\TestRunner.exe 6 cd ..\..\ReleaseGenerators