bug fix #876
This commit is contained in:
miks1965 2018-05-31 00:40:29 +03:00
parent 92a8d17a22
commit 78ea0be0e1
17 changed files with 284 additions and 38 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "4";
public const string Build = "0";
public const string Revision = "1670";
public const string Revision = "1671";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=4
%REVISION%=1670
%COREVERSION%=0
%REVISION%=1671
%MINOR%=4
%MAJOR%=3

Binary file not shown.

View file

@ -2,7 +2,7 @@
// This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301
// Machine: DESKTOP-A6LT9RI
// DateTime: 22.05.2018 22:30:38
// DateTime: 31.05.2018 0:33:45
// UserName: ?????????
// GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource>

View file

@ -3286,7 +3286,7 @@ tuple
if ($6 != null)
parsertools.AddErrorFromResource("BAD_TUPLE",@6);*/
if (($4 as expression_list).Count>7)
if (($4 as expression_list).Count>6)
parsertools.AddErrorFromResource("TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7",@$);
($4 as expression_list).Insert(0,$2);
$$ = new tuple_node($4 as expression_list,@$);

View file

@ -2,7 +2,7 @@
// GPPG version 1.3.6
// Machine: DESKTOP-A6LT9RI
// DateTime: 22.05.2018 22:30:38
// DateTime: 31.05.2018 0:33:46
// UserName: ?????????
// Input file <ABCPascal.y>
@ -5453,7 +5453,7 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
if ($6 != null)
parsertools.AddErrorFromResource("BAD_TUPLE",@6);*/
if ((ValueStack[ValueStack.Depth-4].stn as expression_list).Count>7)
if ((ValueStack[ValueStack.Depth-4].stn as expression_list).Count>6)
parsertools.AddErrorFromResource("TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7",CurrentLocationSpan);
(ValueStack[ValueStack.Depth-4].stn as expression_list).Insert(0,ValueStack[ValueStack.Depth-6].ex);
CurrentSemanticValue.ex = new tuple_node(ValueStack[ValueStack.Depth-4].stn as expression_list,CurrentLocationSpan);

View file

@ -190,5 +190,6 @@ script=

View file

@ -1 +1 @@
!define VERSION '3.4.0.1670'
!define VERSION '3.4.0.1671'

View file

@ -3476,7 +3476,7 @@ begin
Result := Self;
end;
function operator=<T>(x,y: HashSet<T>): boolean; extensionmethod;
function InternalEqual<T>(x,y: HashSet<T>): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
@ -3487,7 +3487,9 @@ begin
else Result := x.SetEquals(y);
end;
function operator<><T>(x,y: HashSet<T>); extensionmethod := not (x=y);
function operator=<T>(x,y: HashSet<T>): boolean; extensionmethod := InternalEqual(x,y);
function operator<><T>(x,y: HashSet<T>); extensionmethod := not InternalEqual(x,y);
function operator-<T>(x, y: HashSet<T>): HashSet<T>; extensionmethod;
begin
@ -3561,7 +3563,7 @@ begin
Result := Self;
end;
function operator=<T>(x,y: SortedSet<T>): boolean; extensionmethod;
function InternalEqual<T>(x,y: SortedSet<T>): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
@ -3572,7 +3574,9 @@ begin
else Result := x.SetEquals(y);
end;
function operator<><T>(x, y: SortedSet<T>); extensionmethod := not x.SetEquals(y);
function operator=<T>(x,y: SortedSet<T>): boolean; extensionmethod := InternalEqual(x,y);
function operator<><T>(x, y: SortedSet<T>); extensionmethod := not InternalEqual(x,y);
function operator-<T>(x, y: SortedSet<T>): SortedSet<T>; extensionmethod;
begin
@ -10340,9 +10344,21 @@ begin
end;
///--
function operator=<T1, T2> (Self: (T1,T2); v: (T1,T2)); extensionmethod := Object.ReferenceEquals(Self,nil) ? Object.ReferenceEquals(v,nil): Self.Equals(v);
function InternalEqual<T1, T2> (x: (T1,T2); y: (T1,T2)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator<><T1, T2> (Self: (T1,T2); v: (T1,T2)); extensionmethod := not (Self = v);
function operator=<T1, T2> (x: (T1,T2); y: (T1,T2)): boolean; extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2> (x: (T1,T2); y: (T1,T2)): boolean; extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup2<T1, T2>(v1: (T1, T2); v2: (T1, T2)) := (v1 as System.IComparable).CompareTo(v2);
///--
@ -10355,9 +10371,20 @@ function operator><T1, T2>(Self: (T1, T2); v: (T1, T2)); extensionmethod := Comp
function operator>=<T1, T2>(Self: (T1, T2); v: (T1, T2)); extensionmethod := CompareToTup2(Self, v) >= 0;
///--
function operator=<T1, T2, T3> (Self: (T1,T2,T3); v: (T1,T2,T3)); extensionmethod := Object.ReferenceEquals(Self,nil) ? Object.ReferenceEquals(v,nil): Self.Equals(v);
function InternalEqual<T1, T2, T3> (x: (T1,T2,T3); y: (T1,T2,T3)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator<><T1, T2, T3> (Self: (T1,T2,T3); v: (T1,T2,T3)); extensionmethod := not (Self = v);
function operator=<T1, T2, T3> (x: (T1,T2,T3); y: (T1,T2,T3)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3> (x: (T1,T2,T3); y: (T1,T2,T3)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup3<T1, T2, T3>(v1: (T1, T2, T3); v2: (T1, T2, T3)) := (v1 as System.IComparable).CompareTo(v2);
///--
@ -10370,9 +10397,20 @@ function operator><T1,T2,T3>(Self: (T1, T2, T3); v: (T1, T2, T3)); extensionmeth
function operator>=<T1,T2,T3>(Self: (T1, T2, T3); v: (T1, T2, T3)); extensionmethod := CompareToTup3(Self, v) >= 0;
///--
function operator=<T1, T2, T3, T4> (Self: (T1,T2,T3,T4); v: (T1,T2,T3,T4)); extensionmethod := Object.ReferenceEquals(Self,nil) ? Object.ReferenceEquals(v,nil): Self.Equals(v);
function InternalEqual<T1, T2, T3, T4> (x: (T1,T2,T3,T4); y: (T1,T2,T3,T4)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator<><T1, T2, T3, T4> (Self: (T1,T2,T3,T4); v: (T1,T2,T3,T4)); extensionmethod := not (Self = v);
function operator=<T1, T2, T3, T4> (x: (T1,T2,T3,T4); y: (T1,T2,T3,T4)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3, T4> (x: (T1,T2,T3,T4); y: (T1,T2,T3,T4)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup4<T1, T2, T3, T4>(v1: (T1, T2, T3, T4); v2: (T1, T2, T3, T4)) := (v1 as System.IComparable).CompareTo(v2);
///--
@ -10384,7 +10422,83 @@ function operator><T1,T2,T3,T4>(Self: (T1, T2, T3, T4); v: (T1, T2, T3, T4)); ex
///--
function operator>=<T1,T2,T3,T4>(Self: (T1, T2, T3, T4); v: (T1, T2, T3, T4)); extensionmethod := CompareToTup4(Self, v) >= 0;
///--
function InternalEqual<T1, T2, T3, T4, T5> (x: (T1,T2,T3,T4,T5); y: (T1,T2,T3,T4,T5)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator=<T1, T2, T3, T4,T5> (x: (T1,T2,T3,T4,T5); y: (T1,T2,T3,T4,T5)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3, T4,T5> (x: (T1,T2,T3,T4,T5); y: (T1,T2,T3,T4,T5)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup5<T1, T2, T3, T4,T5>(v1: (T1, T2, T3, T4,T5); v2: (T1, T2, T3, T4,T5)) := (v1 as System.IComparable).CompareTo(v2);
///--
function operator<<T1,T2,T3,T4,T5>(Self: (T1, T2, T3, T4,T5); v: (T1, T2, T3, T4,T5)); extensionmethod := CompareToTup5(Self, v) < 0;
///--
function operator<=<T1,T2,T3,T4,T5>(Self: (T1, T2, T3, T4,T5); v: (T1, T2, T3, T4,T5)); extensionmethod := CompareToTup5(Self, v) <= 0;
///--
function operator><T1,T2,T3,T4,T5>(Self: (T1, T2, T3, T4,T5); v: (T1, T2, T3, T4,T5)); extensionmethod := CompareToTup5(Self, v) > 0;
///--
function operator>=<T1,T2,T3,T4,T5>(Self: (T1, T2, T3, T4,T5); v: (T1, T2, T3, T4,T5)); extensionmethod := CompareToTup5(Self, v) >= 0;
///--
function InternalEqual<T1, T2, T3, T4, T5, T6> (x: (T1,T2,T3,T4,T5,T6); y: (T1,T2,T3,T4,T5,T6)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator=<T1, T2, T3, T4,T5,T6> (x: (T1,T2,T3,T4,T5,T6); y: (T1,T2,T3,T4,T5,T6)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3, T4,T5,T6> (x: (T1,T2,T3,T4,T5,T6); y: (T1,T2,T3,T4,T5,T6)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup5<T1, T2, T3, T4,T5,T6>(v1: (T1, T2, T3, T4,T5,T6); v2: (T1, T2, T3, T4,T5,T6)) := (v1 as System.IComparable).CompareTo(v2);
///--
function operator<<T1,T2,T3,T4,T5,T6>(Self: (T1, T2, T3, T4,T5,T6); v: (T1, T2, T3, T4,T5,T6)); extensionmethod := CompareToTup5(Self, v) < 0;
///--
function operator<=<T1,T2,T3,T4,T5,T6>(Self: (T1, T2, T3, T4,T5,T6); v: (T1, T2, T3, T4,T5,T6)); extensionmethod := CompareToTup5(Self, v) <= 0;
///--
function operator><T1,T2,T3,T4,T5,T6>(Self: (T1, T2, T3, T4,T5,T6); v: (T1, T2, T3, T4,T5,T6)); extensionmethod := CompareToTup5(Self, v) > 0;
///--
function operator>=<T1,T2,T3,T4,T5,T6>(Self: (T1, T2, T3, T4,T5,T6); v: (T1, T2, T3, T4,T5,T6)); extensionmethod := CompareToTup5(Self, v) >= 0;
///--
function InternalEqual<T1, T2, T3, T4, T5, T6, T7> (x: (T1,T2,T3,T4,T5,T6,T7); y: (T1,T2,T3,T4,T5,T6,T7)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator=<T1, T2, T3, T4,T5,T6,T7> (x: (T1,T2,T3,T4,T5,T6,T7); y: (T1,T2,T3,T4,T5,T6,T7)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3, T4,T5,T6,T7> (x: (T1,T2,T3,T4,T5,T6,T7); y: (T1,T2,T3,T4,T5,T6,T7)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup5<T1, T2, T3, T4,T5,T6,T7>(v1: (T1, T2, T3, T4,T5,T6,T7); v2: (T1, T2, T3, T4,T5,T6,T7)) := (v1 as System.IComparable).CompareTo(v2);
///--
function operator<<T1,T2,T3,T4,T5,T6,T7>(Self: (T1, T2, T3, T4,T5,T6,T7); v: (T1, T2, T3, T4,T5,T6,T7)); extensionmethod := CompareToTup5(Self, v) < 0;
///--
function operator<=<T1,T2,T3,T4,T5,T6,T7>(Self: (T1, T2, T3, T4,T5,T6,T7); v: (T1, T2, T3, T4,T5,T6,T7)); extensionmethod := CompareToTup5(Self, v) <= 0;
///--
function operator><T1,T2,T3,T4,T5,T6,T7>(Self: (T1, T2, T3, T4,T5,T6,T7); v: (T1, T2, T3, T4,T5,T6,T7)); extensionmethod := CompareToTup5(Self, v) > 0;
///--
function operator>=<T1,T2,T3,T4,T5,T6,T7>(Self: (T1, T2, T3, T4,T5,T6,T7); v: (T1, T2, T3, T4,T5,T6,T7)); extensionmethod := CompareToTup5(Self, v) >= 0;
// --------------------------------------------
// Методы расширения типа Tuple # Extension methods for Tuple
// -------------------------------------------

View file

@ -386,10 +386,7 @@ type
end;
public
constructor(model: Visual3D);
begin
CreateBase0(model, 0, 0, 0);
end;
constructor(model: Visual3D) := CreateBase0(model, 0, 0, 0);
property X: real read GetX write SetX;
property Y: real read GetY write SetY;

View file

@ -0,0 +1,23 @@
begin
var a := (1,2,3,4,5,6,7);
var b := (1,2,3,4,5,6,7);
Assert(b=a);
Assert(not (b<>a));
var s1 := SSet(1,2,3);
var s2 := SSet(1,2,3);
Assert(s1=s2);
Assert(not (s1<>s2));
var h1 := HSet(1,2,3);
var h2 := HSet(1,2,3);
Assert(h1=h2);
Assert(not (h1<>h2));
var b1: BigInteger := 2;
var b2: Integer := 2;
Assert(b1=b2);
Assert(not (b1<>b2));
Assert(b2=b1);
Assert(not (b2<>b1));
end.

View file

@ -386,10 +386,7 @@ type
end;
public
constructor(model: Visual3D);
begin
CreateBase0(model, 0, 0, 0);
end;
constructor(model: Visual3D) := CreateBase0(model, 0, 0, 0);
property X: real read GetX write SetX;
property Y: real read GetY write SetY;

View file

@ -3476,7 +3476,7 @@ begin
Result := Self;
end;
function operator=<T>(x,y: HashSet<T>): boolean; extensionmethod;
function InternalEqual<T>(x,y: HashSet<T>): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
@ -3487,7 +3487,9 @@ begin
else Result := x.SetEquals(y);
end;
function operator<><T>(x,y: HashSet<T>); extensionmethod := not (x=y);
function operator=<T>(x,y: HashSet<T>): boolean; extensionmethod := InternalEqual(x,y);
function operator<><T>(x,y: HashSet<T>); extensionmethod := not InternalEqual(x,y);
function operator-<T>(x, y: HashSet<T>): HashSet<T>; extensionmethod;
begin
@ -3561,7 +3563,7 @@ begin
Result := Self;
end;
function operator=<T>(x,y: SortedSet<T>): boolean; extensionmethod;
function InternalEqual<T>(x,y: SortedSet<T>): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
@ -3572,7 +3574,9 @@ begin
else Result := x.SetEquals(y);
end;
function operator<><T>(x, y: SortedSet<T>); extensionmethod := not x.SetEquals(y);
function operator=<T>(x,y: SortedSet<T>): boolean; extensionmethod := InternalEqual(x,y);
function operator<><T>(x, y: SortedSet<T>); extensionmethod := not InternalEqual(x,y);
function operator-<T>(x, y: SortedSet<T>): SortedSet<T>; extensionmethod;
begin
@ -10340,9 +10344,21 @@ begin
end;
///--
function operator=<T1, T2> (Self: (T1,T2); v: (T1,T2)); extensionmethod := Object.ReferenceEquals(Self,nil) ? Object.ReferenceEquals(v,nil): Self.Equals(v);
function InternalEqual<T1, T2> (x: (T1,T2); y: (T1,T2)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator<><T1, T2> (Self: (T1,T2); v: (T1,T2)); extensionmethod := not (Self = v);
function operator=<T1, T2> (x: (T1,T2); y: (T1,T2)): boolean; extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2> (x: (T1,T2); y: (T1,T2)): boolean; extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup2<T1, T2>(v1: (T1, T2); v2: (T1, T2)) := (v1 as System.IComparable).CompareTo(v2);
///--
@ -10355,9 +10371,20 @@ function operator><T1, T2>(Self: (T1, T2); v: (T1, T2)); extensionmethod := Comp
function operator>=<T1, T2>(Self: (T1, T2); v: (T1, T2)); extensionmethod := CompareToTup2(Self, v) >= 0;
///--
function operator=<T1, T2, T3> (Self: (T1,T2,T3); v: (T1,T2,T3)); extensionmethod := Object.ReferenceEquals(Self,nil) ? Object.ReferenceEquals(v,nil): Self.Equals(v);
function InternalEqual<T1, T2, T3> (x: (T1,T2,T3); y: (T1,T2,T3)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator<><T1, T2, T3> (Self: (T1,T2,T3); v: (T1,T2,T3)); extensionmethod := not (Self = v);
function operator=<T1, T2, T3> (x: (T1,T2,T3); y: (T1,T2,T3)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3> (x: (T1,T2,T3); y: (T1,T2,T3)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup3<T1, T2, T3>(v1: (T1, T2, T3); v2: (T1, T2, T3)) := (v1 as System.IComparable).CompareTo(v2);
///--
@ -10370,9 +10397,20 @@ function operator><T1,T2,T3>(Self: (T1, T2, T3); v: (T1, T2, T3)); extensionmeth
function operator>=<T1,T2,T3>(Self: (T1, T2, T3); v: (T1, T2, T3)); extensionmethod := CompareToTup3(Self, v) >= 0;
///--
function operator=<T1, T2, T3, T4> (Self: (T1,T2,T3,T4); v: (T1,T2,T3,T4)); extensionmethod := Object.ReferenceEquals(Self,nil) ? Object.ReferenceEquals(v,nil): Self.Equals(v);
function InternalEqual<T1, T2, T3, T4> (x: (T1,T2,T3,T4); y: (T1,T2,T3,T4)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator<><T1, T2, T3, T4> (Self: (T1,T2,T3,T4); v: (T1,T2,T3,T4)); extensionmethod := not (Self = v);
function operator=<T1, T2, T3, T4> (x: (T1,T2,T3,T4); y: (T1,T2,T3,T4)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3, T4> (x: (T1,T2,T3,T4); y: (T1,T2,T3,T4)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup4<T1, T2, T3, T4>(v1: (T1, T2, T3, T4); v2: (T1, T2, T3, T4)) := (v1 as System.IComparable).CompareTo(v2);
///--
@ -10384,7 +10422,83 @@ function operator><T1,T2,T3,T4>(Self: (T1, T2, T3, T4); v: (T1, T2, T3, T4)); ex
///--
function operator>=<T1,T2,T3,T4>(Self: (T1, T2, T3, T4); v: (T1, T2, T3, T4)); extensionmethod := CompareToTup4(Self, v) >= 0;
///--
function InternalEqual<T1, T2, T3, T4, T5> (x: (T1,T2,T3,T4,T5); y: (T1,T2,T3,T4,T5)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator=<T1, T2, T3, T4,T5> (x: (T1,T2,T3,T4,T5); y: (T1,T2,T3,T4,T5)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3, T4,T5> (x: (T1,T2,T3,T4,T5); y: (T1,T2,T3,T4,T5)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup5<T1, T2, T3, T4,T5>(v1: (T1, T2, T3, T4,T5); v2: (T1, T2, T3, T4,T5)) := (v1 as System.IComparable).CompareTo(v2);
///--
function operator<<T1,T2,T3,T4,T5>(Self: (T1, T2, T3, T4,T5); v: (T1, T2, T3, T4,T5)); extensionmethod := CompareToTup5(Self, v) < 0;
///--
function operator<=<T1,T2,T3,T4,T5>(Self: (T1, T2, T3, T4,T5); v: (T1, T2, T3, T4,T5)); extensionmethod := CompareToTup5(Self, v) <= 0;
///--
function operator><T1,T2,T3,T4,T5>(Self: (T1, T2, T3, T4,T5); v: (T1, T2, T3, T4,T5)); extensionmethod := CompareToTup5(Self, v) > 0;
///--
function operator>=<T1,T2,T3,T4,T5>(Self: (T1, T2, T3, T4,T5); v: (T1, T2, T3, T4,T5)); extensionmethod := CompareToTup5(Self, v) >= 0;
///--
function InternalEqual<T1, T2, T3, T4, T5, T6> (x: (T1,T2,T3,T4,T5,T6); y: (T1,T2,T3,T4,T5,T6)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator=<T1, T2, T3, T4,T5,T6> (x: (T1,T2,T3,T4,T5,T6); y: (T1,T2,T3,T4,T5,T6)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3, T4,T5,T6> (x: (T1,T2,T3,T4,T5,T6); y: (T1,T2,T3,T4,T5,T6)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup5<T1, T2, T3, T4,T5,T6>(v1: (T1, T2, T3, T4,T5,T6); v2: (T1, T2, T3, T4,T5,T6)) := (v1 as System.IComparable).CompareTo(v2);
///--
function operator<<T1,T2,T3,T4,T5,T6>(Self: (T1, T2, T3, T4,T5,T6); v: (T1, T2, T3, T4,T5,T6)); extensionmethod := CompareToTup5(Self, v) < 0;
///--
function operator<=<T1,T2,T3,T4,T5,T6>(Self: (T1, T2, T3, T4,T5,T6); v: (T1, T2, T3, T4,T5,T6)); extensionmethod := CompareToTup5(Self, v) <= 0;
///--
function operator><T1,T2,T3,T4,T5,T6>(Self: (T1, T2, T3, T4,T5,T6); v: (T1, T2, T3, T4,T5,T6)); extensionmethod := CompareToTup5(Self, v) > 0;
///--
function operator>=<T1,T2,T3,T4,T5,T6>(Self: (T1, T2, T3, T4,T5,T6); v: (T1, T2, T3, T4,T5,T6)); extensionmethod := CompareToTup5(Self, v) >= 0;
///--
function InternalEqual<T1, T2, T3, T4, T5, T6, T7> (x: (T1,T2,T3,T4,T5,T6,T7); y: (T1,T2,T3,T4,T5,T6,T7)): boolean;
begin
var xn := Object.ReferenceEquals(x,nil);
var yn := Object.ReferenceEquals(y,nil);
if xn then
Result := yn
else if yn then
Result := xn
else Result := x.Equals(y);
end;
///--
function operator=<T1, T2, T3, T4,T5,T6,T7> (x: (T1,T2,T3,T4,T5,T6,T7); y: (T1,T2,T3,T4,T5,T6,T7)); extensionmethod := InternalEqual(x,y);
///--
function operator<><T1, T2, T3, T4,T5,T6,T7> (x: (T1,T2,T3,T4,T5,T6,T7); y: (T1,T2,T3,T4,T5,T6,T7)); extensionmethod := not InternalEqual(x,y);
///--
function CompareToTup5<T1, T2, T3, T4,T5,T6,T7>(v1: (T1, T2, T3, T4,T5,T6,T7); v2: (T1, T2, T3, T4,T5,T6,T7)) := (v1 as System.IComparable).CompareTo(v2);
///--
function operator<<T1,T2,T3,T4,T5,T6,T7>(Self: (T1, T2, T3, T4,T5,T6,T7); v: (T1, T2, T3, T4,T5,T6,T7)); extensionmethod := CompareToTup5(Self, v) < 0;
///--
function operator<=<T1,T2,T3,T4,T5,T6,T7>(Self: (T1, T2, T3, T4,T5,T6,T7); v: (T1, T2, T3, T4,T5,T6,T7)); extensionmethod := CompareToTup5(Self, v) <= 0;
///--
function operator><T1,T2,T3,T4,T5,T6,T7>(Self: (T1, T2, T3, T4,T5,T6,T7); v: (T1, T2, T3, T4,T5,T6,T7)); extensionmethod := CompareToTup5(Self, v) > 0;
///--
function operator>=<T1,T2,T3,T4,T5,T6,T7>(Self: (T1, T2, T3, T4,T5,T6,T7); v: (T1, T2, T3, T4,T5,T6,T7)); extensionmethod := CompareToTup5(Self, v) >= 0;
// --------------------------------------------
// Методы расширения типа Tuple # Extension methods for Tuple
// -------------------------------------------

View file

@ -61,3 +61,4 @@ USING_UNLOCAL_FOREACH_VARIABLE=Cycle counter variable should be declared in fore
OVERLOAD_IS_NOT_USED=overload is not used in PascalABC.NET
ONLY_BASE_ASSIGNMENT_FOR_TUPLE=Tuple allows only base assignment :=
BAD_FORMAT_STRING=Interpolated string has invalid format
TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7=Count of Tuple elements must be <=7

View file

@ -10,5 +10,4 @@ ONLY_IN_SHORT_FUNC_DEFS_RETURN_TYPE_CANBE_OMITTED=Only in short function definit
ONE_TKIDENTIFIER=Type here must be identifier
SUGARED_NODE_{0}_IN_SYNTAX_TREE_VISITOR=Sugared node {0} must not be visited in syntax_tree_visitor
MISSED_SEMANTIC_CHECK_FOR_SUGARED_NODE_{0}=Missed semantic check for sugared node {0}
TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7=Count of Tuple elements must be <=7
OPERATOR_DQ_MUST_BE_USED_WITH_A_REFERENCE_TYPE_VALUETYPE=Left operand of ?. operation must have reference type

View file

@ -60,3 +60,4 @@ USING_UNLOCAL_FOREACH_VARIABLE=Параметр цикла foreach должен
OVERLOAD_IS_NOT_USED=overload не используется в PascalABC.NET
ONLY_BASE_ASSIGNMENT_FOR_TUPLE=Для кортежа допустимо только обычное присваивание :=
BAD_FORMAT_STRING=Встречена неправильная форматная строка
TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7=Количество элементов кортежа не должно быть больше 7

View file

@ -10,5 +10,4 @@ ONLY_IN_SHORT_FUNC_DEFS_RETURN_TYPE_CANBE_OMITTED=Только в коротки
ONE_TKIDENTIFIER=В качестве типа ожидался идентификатор
SUGARED_NODE_{0}_IN_SYNTAX_TREE_VISITOR=Сахарный узел {0} не должен обходиться в syntax_tree_visitor. Обратитесь к разработчикам PascalABC.NET
MISSED_SEMANTIC_CHECK_FOR_SUGARED_NODE_{0}=Отсутствует семантическая проверка для сахарного узла {0}
TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7=Количество элементов кортежа не должно быть больше 7
OPERATOR_DQ_MUST_BE_USED_WITH_A_REFERENCE_TYPE_VALUETYPE=Левый операнд операции ?. должен иметь ссылочный тип