This commit is contained in:
parent
77f1fd1fec
commit
438be14bd2
|
|
@ -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);
|
||||
|
|
|
|||
19
TestSuite/units/u_partial1.pas
Normal file
19
TestSuite/units/u_partial1.pas
Normal 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.
|
||||
4
TestSuite/usesunits/use_partial1.pas
Normal file
4
TestSuite/usesunits/use_partial1.pas
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
uses u_partial1;
|
||||
begin
|
||||
var o:t1<integer> := new t1<integer>;
|
||||
end.
|
||||
Loading…
Reference in a new issue