This commit is contained in:
Ivan Bondarev 2021-02-07 12:36:52 +01:00
parent 77f1fd1fec
commit 438be14bd2
3 changed files with 28 additions and 1 deletions

View file

@ -1430,7 +1430,9 @@ namespace PascalABCCompiler.PCU
private void WriteTypeReferenceWithDelay(common_type_node type)
{
type_references.Add((int)bw.BaseStream.Position, type);
if (!type_references.ContainsKey((int)bw.BaseStream.Position))
type_references.Add((int)bw.BaseStream.Position, type);
bw.Write((byte)0);
bw.Write(0);
}
@ -2502,6 +2504,8 @@ namespace PascalABCCompiler.PCU
private void VisitTypeDefinition(common_type_node type)
{
int offset = 0;
if (class_info.ContainsKey(type))
return;
if (is_interface == true) offset = SavePositionAndConstPool(type);
else offset = SavePositionAndImplementationPool(type);
bw.Write((byte)type.semantic_node_type);

View file

@ -0,0 +1,19 @@
unit u_partial1;
interface
type
t0<T> = class end;
t1<T> = partial class(t0<T>)
end;
implementation
type
t1<T> = partial class(t0<T>)
end;
end.

View file

@ -0,0 +1,4 @@
uses u_partial1;
begin
var o:t1<integer> := new t1<integer>;
end.