fix #1957
This commit is contained in:
parent
b851677711
commit
4d72da78b0
|
|
@ -5,7 +5,7 @@ using System.Runtime.CompilerServices;
|
|||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PascalABC.NET Compiler")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2005-2019 by Ivan Bondarev, Stanislav Mihalkovich")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2005-2018 by Ivan Bondarev, Stanislav Mihalkovich")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion(RevisionClass.FullVersion)]
|
||||
|
|
@ -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 = "2067";
|
||||
public const string Revision = "2069";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=0
|
||||
%REVISION%=2066
|
||||
%MINOR%=5
|
||||
%REVISION%=2069
|
||||
%COREVERSION%=0
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.5.0.2067'
|
||||
!define VERSION '3.5.0.2069'
|
||||
|
|
|
|||
14
TestSuite/op_implicit_T.pas
Normal file
14
TestSuite/op_implicit_T.pas
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
type
|
||||
t1<T> = class
|
||||
static function operator implicit(o: T): t1<T>; begin Assert(2=1); Result := nil; end;
|
||||
end;
|
||||
t2<T> = class(t1<T>) end;
|
||||
|
||||
procedure p<T>(r: t1<T>);
|
||||
begin
|
||||
r := new t2<T>;
|
||||
end;
|
||||
|
||||
begin
|
||||
p(new t1<integer>);
|
||||
end.
|
||||
|
|
@ -810,6 +810,18 @@ 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<T>
|
||||
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;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static bool is_type_or_original_generics_equal(type_node left, type_node right)
|
||||
{
|
||||
if (left == right)
|
||||
|
|
@ -827,8 +839,9 @@ namespace PascalABCCompiler.TreeRealization
|
|||
}
|
||||
return true;
|
||||
}
|
||||
if (left.is_generic_parameter)
|
||||
return true;
|
||||
if (left.is_generic_parameter) // SSM 29.05.19 надо проверять, что right не содержит T
|
||||
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)
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1318,6 +1318,13 @@ type
|
|||
public
|
||||
constructor(params l: array of AnimationBase) := ll := Lst(l);
|
||||
constructor(l: List<AnimationBase>) := ll := l;
|
||||
function Clone: AnimationBase; override;
|
||||
begin
|
||||
var r := new CompositeAnimation(new List<AnimationBase>());
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue