diff --git a/TreeConverter/TreeConversion/compilation_context.cs b/TreeConverter/TreeConversion/compilation_context.cs index 132c0e06e..086d60a28 100644 --- a/TreeConverter/TreeConversion/compilation_context.cs +++ b/TreeConverter/TreeConversion/compilation_context.cs @@ -1351,7 +1351,7 @@ namespace PascalABCCompiler.TreeConverter common_type_node rez = check_type_name_free_and_predop(name, def_loc, ref partial_class, is_partial); if (rez != null) { - if (is_partial) + if (is_partial && !(rez.ForwardDeclarationOnly && this.namespace_converted)) { if (rez.ForwardDeclarationOnly) AddError(rez.loc, "PARTIAL_CLASS_PREDEFINITION_NOT_ALLOWED");