From b333fd6b04f4f4793d1cd2cc8614fc9a56dd4363 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Mon, 1 Jul 2019 22:32:06 +0300 Subject: [PATCH] b xor i --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/xor_byte_int.pas | 6 ++++++ .../TreeConversion/convertion_data_and_alghoritms.cs | 4 +++- 5 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 TestSuite/xor_byte_int.pas diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 6c3133e8b..675e373b2 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 = "2169"; + public const string Revision = "2170"; 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 c2071c741..5dbe85bd8 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=5 -%REVISION%=2169 %COREVERSION%=0 +%REVISION%=2170 +%MINOR%=5 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 018775e1b..4a0172a0b 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.5.0.2169' +!define VERSION '3.5.0.2170' diff --git a/TestSuite/xor_byte_int.pas b/TestSuite/xor_byte_int.pas new file mode 100644 index 000000000..95f67b6cb --- /dev/null +++ b/TestSuite/xor_byte_int.pas @@ -0,0 +1,6 @@ +begin + var b: byte := 255; + var i: int64 := 256; + Assert(b xor i = 511); + Assert(i xor b = 511); +end. \ No newline at end of file diff --git a/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs b/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs index 85e7e9b74..d10f5eb6a 100644 --- a/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs +++ b/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs @@ -2082,7 +2082,9 @@ namespace PascalABCCompiler.TreeConverter //Тупая заглушка для примитивных типов. иначе не работает +=, у нас лишком много неявных приведений //в дальнейшем может вызвать странное поведение, это надо проверить if (set_of_possible_functions.Count == 2 && indefinits.Count == 0) - if (set_of_possible_functions[0] is basic_function_node && set_of_possible_functions[1] is basic_function_node) + if (set_of_possible_functions[0] is basic_function_node && set_of_possible_functions[1] is basic_function_node + // добавил это условие из-за комментария. Не понимаю, почему иначе не работает +=. Все тесты проходят 01.07.19 если закомментировать вообще этот if !!! + && set_of_possible_functions[0].name == "+=" && set_of_possible_functions[1].name == "+=") return set_of_possible_functions[0]; if (indefinits.Count > 0)