fix #2307
This commit is contained in:
parent
a75e97e423
commit
34ddecdbd3
|
|
@ -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)
|
||||
|
|
|
|||
11
TestSuite/CompilationSamples/u5.pas
Normal file
11
TestSuite/CompilationSamples/u5.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
unit u5;
|
||||
|
||||
uses u7;
|
||||
|
||||
procedure p1;
|
||||
begin
|
||||
var a: t2;
|
||||
a.p0;
|
||||
end;
|
||||
|
||||
end.
|
||||
10
TestSuite/CompilationSamples/u6.pas
Normal file
10
TestSuite/CompilationSamples/u6.pas
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
unit u6;
|
||||
|
||||
type
|
||||
t1 = class
|
||||
|
||||
public procedure p0 := exit;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
8
TestSuite/CompilationSamples/u7.pas
Normal file
8
TestSuite/CompilationSamples/u7.pas
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
unit u7;
|
||||
|
||||
uses u6;
|
||||
|
||||
type
|
||||
t2 = class(t1) end;
|
||||
|
||||
end.
|
||||
Loading…
Reference in a new issue