This commit is contained in:
Ivan Bondarev 2022-07-24 15:34:42 +02:00
parent d976420231
commit d24078f590
2 changed files with 12 additions and 1 deletions

View file

@ -0,0 +1,9 @@
//!Неизвестное имя 'T2'
procedure p1<T1>; where T1, T2: record;
begin
end;
begin
end.

View file

@ -12899,6 +12899,7 @@ namespace PascalABCCompiler.TreeConverter
List<common_type_node> used_types = new List<common_type_node>(where_list.defs.Count);
foreach (SyntaxTree.where_definition wd in where_list.defs)
{
int ind = 0;
foreach (SyntaxTree.ident wd_id in wd.names.idents)
{
bool param_not_found = true;
@ -12919,8 +12920,9 @@ namespace PascalABCCompiler.TreeConverter
}
if (param_not_found)
{
AddError(new UndefinedNameReference(wd.names.idents[0].name, get_location(wd.names)));
AddError(new UndefinedNameReference(wd.names.idents[ind].name, get_location(wd.names.idents[ind])));
}
ind++;
}
}
context.EndSkipGenericInstanceChecking();