From fe5b3353ded6c555e67e3f3adc005d2f6d490ca1 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Thu, 9 Jul 2020 23:01:39 +0300 Subject: [PATCH] fix #2280 --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- Localization/DefaultLang.resources | Bin 94892 -> 94998 bytes Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/Qpoint1.pas | 7 +++++++ .../semantic_checks_for_sugar.cs | 2 +- 7 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 TestSuite/Qpoint1.pas diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 2bb6198c3..9d7c65855 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 = "2568"; + public const string Revision = "2569"; 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 492a655b8..9983d9b14 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=3 -%REVISION%=2568 %MINOR%=6 +%REVISION%=2569 +%COREVERSION%=3 %MAJOR%=3 diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index 3b61dd5c3bfc193e2d08482b3d6dcc5b11e58da2..da4f35610833b739db6184f12e140301aaf8c46a 100644 GIT binary patch delta 64 zcmV-G0KfmNMs}M?(62|?I7X% W^86s+;qmhD;Og@2`|Puo=ogAM4<*q6 delta 20 ccmbRCjCIXZ)(H=oP84o@bmIADk(W$e0CwC9K>z>% diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index e287b0672..92166aedd 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.6.3.2568 +3.6.3.2569 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 553380969..79c3ebf51 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.6.3.2568' +!define VERSION '3.6.3.2569' diff --git a/TestSuite/Qpoint1.pas b/TestSuite/Qpoint1.pas new file mode 100644 index 000000000..33727e17c --- /dev/null +++ b/TestSuite/Qpoint1.pas @@ -0,0 +1,7 @@ +// #2280 +begin + var a: sequence of object := Seq(object(1)); + //Ошибка: Левый операнд операции ?. должен иметь ссылочный тип + var o := a?.First; + Assert(o.Equals(1)); +end. \ No newline at end of file diff --git a/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs b/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs index 727a521b1..17f082c8f 100644 --- a/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs +++ b/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs @@ -123,7 +123,7 @@ namespace PascalABCCompiler.TreeConverter else if (av.type is compiled_type_node ctn1) t = ctn1.compiled_type; - if (!av.type.is_class && !(t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>))) + if (!av.type.is_class && !av.type.IsInterface && !(t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>))) AddError(av.location, "OPERATOR_DQ_MUST_BE_USED_WITH_A_REFERENCE_TYPE_VALUETYPE"); }