diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index a341e09a9..2a0f78eee 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 = "1"; public const string Build = "0"; - public const string Revision = "1230"; + public const string Revision = "1231"; 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 a3b57d963..77b15647d 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=1 -%REVISION%=1230 %COREVERSION%=0 +%REVISION%=1231 +%MINOR%=1 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 69f79d594..c40967416 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.1.0.1230' +!define VERSION '3.1.0.1231' diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index e33a8c8bd..201bb6f12 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -11442,8 +11442,11 @@ namespace PascalABCCompiler.TreeConverter AddError(context.top_function.loc, "IMPOSSIBLE!SHORT_FUNC_WITHOUT_BODY"); } - statement_node aa = cd.statements[0]; - var bfc = cd.statements[0] as basic_function_call; + // Проблема в том, что если в теле короткого определения функции - лямбда + // и происходит захват переменной, то в тело выносится вызов конструктора сгенерированного класса + // Поэтому result := ... - это не первый оператор, а последний!!! + statement_node aa = cd.statements[cd.statements.Count-1]; + var bfc = aa as basic_function_call; if (bfc != null) { var ttt1 = bfc.type; diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index d005b7a37..51ed41052 100644 Binary files a/bin/Lib/PABCRtl.dll and b/bin/Lib/PABCRtl.dll differ