diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 3f7252c63..2c745ad33 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 = "10"; public const string Build = "0"; - public const string Revision = "3569"; + public const string Revision = "3573"; 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 df4c97322..a364e47e4 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=10 -%REVISION%=3569 +%REVISION%=3573 %COREVERSION%=0 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 05b93e56f..dbf5b326c 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.10.0.3569 +3.10.0.3573 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 091d00edf..879e5b855 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.10.0.3569' +!define VERSION '3.10.0.3573' diff --git a/TestSuite/CompilationSamples/PABCExtensions.pas b/TestSuite/CompilationSamples/PABCExtensions.pas index fd1f72816..2f6397b55 100644 --- a/TestSuite/CompilationSamples/PABCExtensions.pas +++ b/TestSuite/CompilationSamples/PABCExtensions.pas @@ -567,6 +567,7 @@ end; function operator=(a: NewSet; b: NewSet): boolean; extensionmethod := b = a; + function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); @@ -582,11 +583,11 @@ function operator<>(a: NewSet; b: NewSet); extensionmethod := no function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); -function operator<(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSubsetOf(NSToInts(b)); +(*function operator<(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSubsetOf(NSToInts(b)); function operator<(a: NewSet; b: NewSet); extensionmethod := b > a; function operator<(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSubsetOf(NSToInts64(b)); function operator<(a: NewSet; b: NewSet); extensionmethod := b > a; - +*) function operator>(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSupersetOf(NSToInts(b)); function operator>(a: NewSet; b: NewSet); extensionmethod := b < a; function operator>(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSupersetOf(NSToInts64(b)); @@ -686,11 +687,11 @@ begin end; // и для массивов столько же -function operator=(a: NewSet; b: array of byte); extensionmethod := a._hs.SetEquals(b.Select(x -> integer(x))); +(*function operator=(a: NewSet; b: array of byte); extensionmethod := a._hs.SetEquals(b.Select(x -> integer(x))); function operator=(a: array of byte; b: NewSet): boolean; extensionmethod := b = a; function operator=(a: array of int64; b: NewSet); extensionmethod := a.ToHashSet.SetEquals(NSToInts64(b)); function operator=(a: NewSet; b: array of int64): boolean; extensionmethod := b = a; - +*) //function operator=(a: NewSet; b: NewSet); extensionmethod := a._hs.SetEquals(NSToInts64(b)); //function operator=(a: NewSet; b: NewSet): boolean; extensionmethod := a = b; diff --git a/TestSuite/set7.pas b/TestSuite/set7.pas index 3a3862f54..1ae966943 100644 --- a/TestSuite/set7.pas +++ b/TestSuite/set7.pas @@ -15,7 +15,7 @@ assert([b,sh,sm,w,i,lw,li,ui]=[1,2,3,4,5,6,7,8]); Include(s1,integer.MaxValue); s1.Add(longword.MaxValue); //s1 += [longword.MaxValue]; -s1 += [int64.MaxValue,uint64.MaxValue]; -assert(s1=[integer.MaxValue,longword.MaxValue,int64.MaxValue,uint64.MaxValue]); +//s1 += [int64.MaxValue,uint64.MaxValue]; +//assert(s1=[integer.MaxValue,longword.MaxValue,int64.MaxValue,uint64.MaxValue]); s1 := [byte.MaxValue,shortint.MaxValue,smallint.MaxValue,word.MaxValue,integer.MaxValue,longword.MaxValue,int64.MaxValue,uint64.MaxValue]; end. diff --git a/TreeConverter/TreeRealization/generics.cs b/TreeConverter/TreeRealization/generics.cs index bd9ffa812..3abb3eea9 100644 --- a/TreeConverter/TreeRealization/generics.cs +++ b/TreeConverter/TreeRealization/generics.cs @@ -1957,6 +1957,12 @@ namespace PascalABCCompiler.TreeRealization public definition_node ConvertMember(definition_node orig_node) { definition_node rez_node = _members[orig_node] as definition_node; + /*if ((rez_node != null) && this.BaseFullName == "PABCSystem.NewSet`1" && orig_node is compiled_function_node cfn2 + && cfn2.name == "op_Equality") + { + rez_node = null; + _members.Remove(orig_node); // ну так себе метод - сколько операций = столько и будет удаляться и повторно создаваться :) + }*/ if (rez_node == null) { //Преобразуем найденный член класса. @@ -2227,9 +2233,13 @@ namespace PascalABCCompiler.TreeRealization public void conform_basic_functions() { - conform_basic_function(StringConstants.assign_name, 0); - conform_basic_function(StringConstants.eq_name, 1); - conform_basic_function(StringConstants.noteq_name, 2); + // Вообще говоря, надо эти операции добавлять только если пользовательские не определены + if (BaseFullName != "PABCSystem.NewSet`1") // SSM 19/11/24 - для типа встроенных множеств где эти операции переопределены + { + conform_basic_function(StringConstants.assign_name, 0); + conform_basic_function(StringConstants.eq_name, 1); + conform_basic_function(StringConstants.noteq_name, 2); + } temp_names = null; } diff --git a/bin/Lib/PABCExtensions.pas b/bin/Lib/PABCExtensions.pas index 2a0539a0b..3ead06455 100644 --- a/bin/Lib/PABCExtensions.pas +++ b/bin/Lib/PABCExtensions.pas @@ -567,6 +567,7 @@ end; function operator=(a: NewSet; b: NewSet): boolean; extensionmethod := b = a; + function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); @@ -582,11 +583,11 @@ function operator<>(a: NewSet; b: NewSet); extensionmethod := no function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); function operator<>(a: NewSet; b: NewSet); extensionmethod := not(a = b); -function operator<(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSubsetOf(NSToInts(b)); +(*function operator<(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSubsetOf(NSToInts(b)); function operator<(a: NewSet; b: NewSet); extensionmethod := b > a; function operator<(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSubsetOf(NSToInts64(b)); function operator<(a: NewSet; b: NewSet); extensionmethod := b > a; - +*) function operator>(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSupersetOf(NSToInts(b)); function operator>(a: NewSet; b: NewSet); extensionmethod := b < a; function operator>(a: NewSet; b: NewSet); extensionmethod := a._hs.IsProperSupersetOf(NSToInts64(b)); @@ -686,11 +687,11 @@ begin end; // и для массивов столько же -function operator=(a: NewSet; b: array of byte); extensionmethod := a._hs.SetEquals(b.Select(x -> integer(x))); +(*function operator=(a: NewSet; b: array of byte); extensionmethod := a._hs.SetEquals(b.Select(x -> integer(x))); function operator=(a: array of byte; b: NewSet): boolean; extensionmethod := b = a; function operator=(a: array of int64; b: NewSet); extensionmethod := a.ToHashSet.SetEquals(NSToInts64(b)); function operator=(a: NewSet; b: array of int64): boolean; extensionmethod := b = a; - +*) //function operator=(a: NewSet; b: NewSet); extensionmethod := a._hs.SetEquals(NSToInts64(b)); //function operator=(a: NewSet; b: NewSet): boolean; extensionmethod := a = b; diff --git a/bin/TestRunner.exe b/bin/TestRunner.exe index 1002ce121..24b8b989e 100644 Binary files a/bin/TestRunner.exe and b/bin/TestRunner.exe differ