diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 61c107be9..14a7e163d 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 = "6"; public const string Build = "3"; - public const string Revision = "2541"; + public const string Revision = "2543"; 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 06e124b4a..897f64a13 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=6 -%REVISION%=2541 +%REVISION%=2543 %COREVERSION%=3 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index a261d8f7d..e5884c785 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.6.3.2541 +3.6.3.2543 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 210f4a311..44bdf791f 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.6.3.2541' +!define VERSION '3.6.3.2543' diff --git a/TestSuite/StaticInLam1.pas b/TestSuite/StaticInLam1.pas new file mode 100644 index 000000000..3a199ba2a --- /dev/null +++ b/TestSuite/StaticInLam1.pas @@ -0,0 +1,21 @@ +//#2199 - частично +type + t0 = class + end; + + t2 = class(t0) + static function p1 := 33; + procedure ppp; + begin + Assert(p1=33); + Assert(t2.p1=33); + //t0&.p1; + {var p: ()->() := ()-> + begin + end;} + end; + end; + +begin + t2.Create.ppp; +end. \ No newline at end of file diff --git a/TreeConverter/SymbolTable/DSST/SymbolTable.cs b/TreeConverter/SymbolTable/DSST/SymbolTable.cs index fa2b3e5e9..22b7bcf04 100644 --- a/TreeConverter/SymbolTable/DSST/SymbolTable.cs +++ b/TreeConverter/SymbolTable/DSST/SymbolTable.cs @@ -827,9 +827,18 @@ namespace SymbolTable { while (cl.BaseClassScope != null) { - tn = cl.BaseClassScope.Symbols.Find(name); + tn = cl.BaseClassScope.Symbols.Find(name); // SSM 30/06/20 - надо исключать generis-параметры из поиска - их не существует в производном классе!!! if (tn != null) - AddToSymbolInfo(tn.InfoList, Result); + { + if (tn.InfoList[0].sym_info is PascalABCCompiler.TreeRealization.common_type_node cctt && cctt.is_generic_parameter) + { + // пропустить!!! + } + else + { + AddToSymbolInfo(tn.InfoList, Result); + } + } ar = cl.BaseClassScope; if (ar is DotNETScope) diff --git a/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs b/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs index 06ff6937c..74fd004b1 100644 --- a/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs +++ b/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs @@ -1658,13 +1658,13 @@ namespace PascalABCCompiler.TreeConverter private void convert_function_call_expressions(function_node fn,expressions_list exprs, possible_type_convertions_list ptcal) { - var needToConvertParamsToFunctionCall = true; + var needToConvertParamsToFunctionCall = true; // SSM #2079 29/06/20 var lastIsParams = fn.parameters.Count > 0 && fn.parameters[fn.parameters.Count - 1].is_params; if (lastIsParams && fn.parameters[fn.parameters.Count - 1].type.element_type.IsDelegate) needToConvertParamsToFunctionCall = false; // параметры params - преобразовывать ли в вызовы - for (int i = 0; i < exprs.Count; i++) + for (int i = 0; i < exprs.Count; i++) { // надо отдельно расшифровывать params и в них тоже не преобразовывать если там делегаты // Если функция возвращает функцию, то это к сожалению не будет работать @@ -1678,7 +1678,8 @@ namespace PascalABCCompiler.TreeConverter syntax_tree_visitor.try_convert_typed_expression_to_function_call(ref ex); exprs[i] = ex; } - } + } // SSM end 29/06/20 + for (int i=0;i= fn.parameters.Count - 1))