This commit is contained in:
Бондарев Иван 2020-09-20 15:08:55 +02:00
parent a75e97e423
commit 34ddecdbd3
4 changed files with 35 additions and 0 deletions

View file

@ -883,6 +883,8 @@ namespace PascalABCCompiler.PCU
unit.ImplementationUsedUnits.AddElement(comp_cnn.cont_unit);
ns_dict[comp_cnn] = true;
}
if (tn.base_type is common_type_node)
AddIndirectUsedUnitsForType(tn.base_type, ns_dict, interf);
}
}
@ -931,6 +933,8 @@ namespace PascalABCCompiler.PCU
common_namespace_node cnn = cun.namespaces[0];
foreach (common_type_node ctn in cnn.types)
{
if (ctn.base_type != null)
AddIndirectUsedUnitsForType(ctn.base_type, interf_ns_dict, true);
foreach (common_method_node cmn in ctn.methods)
{
if (cmn.is_constructor && cmn.function_code != null && cmn.function_code.location == null)
@ -979,6 +983,8 @@ namespace PascalABCCompiler.PCU
common_namespace_node cnn = cun.namespaces[1];
foreach (common_type_node ctn in cnn.types)
{
if (ctn.base_type != null)
AddIndirectUsedUnitsForType(ctn.base_type, impl_ns_dict, true);
foreach (common_method_node cmn in ctn.methods)
{
if (cmn.is_constructor && cmn.function_code != null && cmn.function_code.location == null)

View file

@ -0,0 +1,11 @@
unit u5;
uses u7;
procedure p1;
begin
var a: t2;
a.p0;
end;
end.

View file

@ -0,0 +1,10 @@
unit u6;
type
t1 = class
public procedure p0 := exit;
end;
end.

View file

@ -0,0 +1,8 @@
unit u7;
uses u6;
type
t2 = class(t1) end;
end.