Merge pull request #2823 from samuraiGH/reintroduce+override

Запрет на совместное использование `reintroduce` и `override`
This commit is contained in:
Ivan Bondarev 2023-03-19 11:06:38 +01:00 committed by GitHub
commit 8305a8c449
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14196,7 +14196,10 @@ namespace PascalABCCompiler.TreeConverter
{ {
AddError(get_location(_procedure_attributes_list.proc_attributes[i]), "ATTRIBUTES_IN_INTERFACE_MEMBER"); AddError(get_location(_procedure_attributes_list.proc_attributes[i]), "ATTRIBUTES_IN_INTERFACE_MEMBER");
} }
if (is_override)
{
AddError(get_location(_procedure_attributes_list.proc_attributes[i]), "USING_MODIFIERS{0}_{1}_TOGETHER_NOT_ALLOWED", _procedure_attributes_list.proc_attributes[i].name, override_proc_attr);
}
common_function_node ccfn = context.top_function; common_function_node ccfn = context.top_function;
if (ccfn.return_value_type is undefined_type) if (ccfn.return_value_type is undefined_type)
{ {