From 77f1fd1fec54a06b3f3201d530a96841d2535349 Mon Sep 17 00:00:00 2001 From: Ivan Bondarev Date: Sun, 7 Feb 2021 12:15:13 +0100 Subject: [PATCH] fix --- TreeConverter/TreeConversion/compilation_context.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");