Вернул RebuildPython

This commit is contained in:
Mikhalkovich Stanislav 2026-01-06 19:10:48 +03:00
parent 5b17f21114
commit 9400fa52f8
7 changed files with 21 additions and 12 deletions

View file

@ -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;

View file

@ -1,4 +1,4 @@
%MINOR%=11
%REVISION%=3731
%REVISION%=3733
%COREVERSION%=0
%MAJOR%=3

View file

@ -1 +1 @@
3.11.0.3731
3.11.0.3733

View file

@ -1 +1 @@
!define VERSION '3.11.0.3731'
!define VERSION '3.11.0.3733'

View file

@ -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

View file

@ -19887,6 +19887,12 @@ namespace PascalABCCompiler.TreeConverter
AddError(loc, "ABSTRACT_CONSTRUCTOR_{0}_CALL", tn.name);
}
List<SymbolInfo> 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");

View file

@ -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