This commit is contained in:
parent
9ffbea0c95
commit
9acb0d71a8
7
TestSuite/units/u_abstract2.pas
Normal file
7
TestSuite/units/u_abstract2.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
unit u_abstract2;
|
||||
type
|
||||
t1<TSelf> = abstract class
|
||||
where TSelf: t1<TSelf>;
|
||||
end;
|
||||
|
||||
end.
|
||||
10
TestSuite/usesunits/use_abstract2.pas
Normal file
10
TestSuite/usesunits/use_abstract2.pas
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
uses u_abstract2;
|
||||
|
||||
type
|
||||
t2 = abstract class(t1<t2>) end;
|
||||
t3 = class(t2)
|
||||
end;
|
||||
|
||||
begin
|
||||
new t3;
|
||||
end.
|
||||
|
|
@ -66,6 +66,7 @@ namespace PascalABCCompiler.TreeRealization
|
|||
foreach (type_node t in generic_params)
|
||||
{
|
||||
generic_parameter_eliminations gpe = new generic_parameter_eliminations();
|
||||
|
||||
gpe.has_default_ctor = generic_convertions.type_has_default_ctor(t, false);
|
||||
if (t is common_type_node && (t as common_type_node).has_explicit_default_constructor)
|
||||
gpe.has_explicit_default_ctor = true;
|
||||
|
|
@ -1791,6 +1792,14 @@ namespace PascalABCCompiler.TreeRealization
|
|||
return cmn;
|
||||
}
|
||||
|
||||
public override bool IsAbstract
|
||||
{
|
||||
get
|
||||
{
|
||||
return original_generic.IsAbstract;
|
||||
}
|
||||
}
|
||||
|
||||
public override List<type_node> instance_params
|
||||
{
|
||||
get
|
||||
|
|
|
|||
Loading…
Reference in a new issue