fix #1247
This commit is contained in:
parent
bb2ef43840
commit
50338b6f4c
|
|
@ -10701,7 +10701,11 @@ namespace PascalABCCompiler.TreeConverter
|
|||
class_definition cl_def = td.type_def as class_definition;
|
||||
if (cl_def.body == null)
|
||||
AddError(get_location(cl_def), "TYPE_PREDEFINITION_NOT_ALLOWED");
|
||||
common_type_node ctn = context.advanced_create_type(td.type_name.name, get_location(td.type_name), (td.type_def as class_definition).keyword == class_keyword.Interface, false);
|
||||
common_type_node ctn = null;
|
||||
if (td.type_name is template_type_name)
|
||||
ctn = context.advanced_create_type(td.type_name.name+"`"+(td.type_name as template_type_name).template_args.Count, get_location(td.type_name), (td.type_def as class_definition).keyword == class_keyword.Interface, false);
|
||||
else
|
||||
ctn = context.advanced_create_type(td.type_name.name, get_location(td.type_name), (td.type_def as class_definition).keyword == class_keyword.Interface, false);
|
||||
ctn.ForwardDeclarationOnly = true;
|
||||
if ((td.type_def as class_definition).keyword == class_keyword.Interface)
|
||||
ctn.IsInterface = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue