diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index fae86a280..006b50de2 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 = "9"; public const string Build = "0"; - public const string Revision = "3295"; + public const string Revision = "3296"; 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 78c55ed74..f7e61fbab 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=9 -%REVISION%=3295 %COREVERSION%=0 +%REVISION%=3296 +%MINOR%=9 %MAJOR%=3 diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index 4b676290d..d2b5c02f7 100644 Binary files a/Localization/DefaultLang.resources and b/Localization/DefaultLang.resources differ diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 8667c77f1..6f786e869 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.9.0.3295 +3.9.0.3296 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 5d939162d..159d4c880 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.9.0.3295' +!define VERSION '3.9.0.3296' diff --git a/SyntaxVisitors/SugarVisitors/IndexVisitor.cs b/SyntaxVisitors/SugarVisitors/IndexVisitor.cs index 536363f52..c4faa8a8d 100644 --- a/SyntaxVisitors/SugarVisitors/IndexVisitor.cs +++ b/SyntaxVisitors/SugarVisitors/IndexVisitor.cs @@ -35,8 +35,13 @@ namespace SyntaxVisitors.SugarVisitors ind.source_context); syntax_tree_node mc = null; var possibleIndexer = ind.Parent?.Parent; + if (ind.Parent != null && !(ind.Parent is expression_list)) + possibleIndexer = null; if (possibleIndexer != null && possibleIndexer is indexer indexer) { + // x[1:^1][5] - не должно сюда заходить в этом случае !!! Но неожиданно possibleIndexer оказывается expr[5] + // Сюда должно заходить только при x[^1,3]. То есть, ind.Parent д.б. expression_list и только в этом случае!!! + // Надо подняться до узла indexer и запомнить индекс, под которым данный index входит // Идём по Parent - и смотрим, когда Parent = indexer // Находим у него expressions и ищем, под каким индексом в нем содержится текущий. diff --git a/TestSuite/sl_ind.pas b/TestSuite/sl_ind.pas new file mode 100644 index 000000000..46e4ed855 --- /dev/null +++ b/TestSuite/sl_ind.pas @@ -0,0 +1,4 @@ +begin + var x:=|1,2,3,4,5,6,7,8,9,10|; + Assert(x[1:^1][5] = 7); +end. \ No newline at end of file