diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 646cbed36..fdd2f3221 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 = "5"; public const string Build = "0"; - public const string Revision = "2077"; + public const string Revision = "2084"; 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 4a63753c9..974beb8b6 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=5 -%REVISION%=2077 %COREVERSION%=0 +%REVISION%=2084 +%MINOR%=5 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index ab4e8328d..35bcef5ff 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.5.0.2077' +!define VERSION '3.5.0.2084' diff --git a/TestSuite/lambda_capture_local_and_proc_noparams_call.pas b/TestSuite/lambda_capture_local_and_proc_noparams_call.pas new file mode 100644 index 000000000..95a650c3a --- /dev/null +++ b/TestSuite/lambda_capture_local_and_proc_noparams_call.pas @@ -0,0 +1,20 @@ +type + t1 = class + public procedure p0 := exit; + public i: integer := 2; + + public procedure p1; + begin + var v := 0; + var p: procedure := ()->begin + v := v; + Assert(i=2); + p0; + end; + p; + end; + end; + +begin + t1.Create.p1; +end. \ No newline at end of file diff --git a/TreeConverter/LambdaExpressions/Closure/CapturedVariablesTreeBuilder.cs b/TreeConverter/LambdaExpressions/Closure/CapturedVariablesTreeBuilder.cs index 2aa93adb5..3bc833d40 100644 --- a/TreeConverter/LambdaExpressions/Closure/CapturedVariablesTreeBuilder.cs +++ b/TreeConverter/LambdaExpressions/Closure/CapturedVariablesTreeBuilder.cs @@ -164,7 +164,7 @@ namespace TreeConverter.LambdaExpressions.Closure si.sym_info.semantic_node_type == semantic_node_type.common_namespace_function_node || si.sym_info.semantic_node_type == semantic_node_type.namespace_constant_definition || si.sym_info.semantic_node_type == semantic_node_type.compiled_function_node || - si.sym_info.semantic_node_type == semantic_node_type.common_method_node || // SSM bug fix #167 + //si.sym_info.semantic_node_type == semantic_node_type.common_method_node || // SSM bug fix #167 - SSM 30.05.19 эта строчка не влияет на #167 и я её закомментировал si.sym_info.semantic_node_type == semantic_node_type.compiled_namespace_node || si.sym_info.semantic_node_type == semantic_node_type.compiled_variable_definition || si.sym_info.semantic_node_type == semantic_node_type.common_type_node || diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index defcf9c5e..7e36515b9 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -3224,7 +3224,8 @@ namespace PascalABCCompiler.TreeConverter if (id != null) { mc = new SyntaxTree.method_call(); - mc.dereferencing_value = id; + mc.dereferencing_value = id; // дело в том, что это присваивание перенаправляет Parent на method_call, которого нет в синтаксическом дереве. + id.Parent = _procedure_call; // fix #891 вернули Parent назад //DarkStar Add //Добавил т.к. нужно для генерации отладочной инфы mc.source_context = id.source_context; @@ -3236,6 +3237,7 @@ namespace PascalABCCompiler.TreeConverter { mc = new SyntaxTree.method_call(); mc.dereferencing_value = adrv; + adrv.Parent = _procedure_call; // fix #891 //DarkStar Add //Добавил т.к. нужно для генерации отладочной инфы mc.source_context = adrv.source_context;