From a73085a9533b521a4c9beb4da839660ffa104441 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Thu, 30 May 2019 06:56:22 +0300 Subject: [PATCH] bug fix #1957 --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/CompilationSamples/graph3d.pas | 9 ++++++++- ...{op_implicit_T.pas => operator_implicit_T.pas} | 0 TreeConverter/TreeRealization/type_table.cs | 15 +++++++-------- 6 files changed, 18 insertions(+), 12 deletions(-) rename TestSuite/{op_implicit_T.pas => operator_implicit_T.pas} (100%) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 3e2253617..dfb547802 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 = "2069"; + public const string Revision = "2075"; 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 a51013b8f..9a7ee5d5a 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=5 -%REVISION%=2069 +%REVISION%=2075 %COREVERSION%=0 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 5a8ca6d09..6ff45e4cd 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.5.0.2069' +!define VERSION '3.5.0.2075' diff --git a/TestSuite/CompilationSamples/graph3d.pas b/TestSuite/CompilationSamples/graph3d.pas index eaa1606b9..078d4047f 100644 --- a/TestSuite/CompilationSamples/graph3d.pas +++ b/TestSuite/CompilationSamples/graph3d.pas @@ -1318,6 +1318,13 @@ type public constructor(params l: array of AnimationBase) := ll := Lst(l); constructor(l: List) := ll := l; + function Clone: AnimationBase; override; + begin + var r := new CompositeAnimation(new List()); + for var i := 0 to ll.Count-1 do + r.ll.Add(ll[i].Clone); + Result := r; + end; end; GroupAnimation = class(CompositeAnimation) @@ -1376,7 +1383,7 @@ type // lf надо в любом случае клонировать // Клонируем. Надо еще списки клонировать! А то в a+a во втором списке последний элемент - клонированный - в обоих списках! - lf := lf.Clone; + //lf := lf.Clone; llf[lli] := lf; lf.Completed += procedure -> begin diff --git a/TestSuite/op_implicit_T.pas b/TestSuite/operator_implicit_T.pas similarity index 100% rename from TestSuite/op_implicit_T.pas rename to TestSuite/operator_implicit_T.pas diff --git a/TreeConverter/TreeRealization/type_table.cs b/TreeConverter/TreeRealization/type_table.cs index 43cc718c9..51ad514a3 100644 --- a/TreeConverter/TreeRealization/type_table.cs +++ b/TreeConverter/TreeRealization/type_table.cs @@ -813,13 +813,12 @@ namespace PascalABCCompiler.TreeRealization static bool not_contains_type(type_node right, type_node left) // вызывать только если left - generic parameter { System.Diagnostics.Debug.Assert(left.is_generic_parameter); // вроде рекурсивно не надо просматривать right т.к. это обрезается другой проверкой - один из типов должен быть t1 - if (!right.is_generic_type_instance) - return false; - for (int i = 0; i < right.instance_params.Count; i++) - { - if (right.instance_params[i] == left) - return false; - } + if (right.is_generic_type_instance) + for (int i = 0; i < right.instance_params.Count; i++) + { + if (right.instance_params[i] == left) + return false; + } return true; } public static bool is_type_or_original_generics_equal(type_node left, type_node right) @@ -840,7 +839,7 @@ namespace PascalABCCompiler.TreeRealization return true; } if (left.is_generic_parameter) // SSM 29.05.19 надо проверять, что right не содержит T - return not_contains_type(right, left); + return not_contains_type(right, left); // нет, другие тесты падают //return true; if (left.type_special_kind == SemanticTree.type_special_kind.set_type && right == SystemLibrary.SystemLibInitializer.TypedSetType.sym_info || right.type_special_kind == SemanticTree.type_special_kind.set_type && left == SystemLibrary.SystemLibInitializer.TypedSetType.sym_info)