Improved syntax checks for "implements" keyword

git-svn-id: trunk@4350 -
This commit is contained in:
chrivers 2006-08-05 19:58:14 +00:00
parent 94f3f07a97
commit c185650955

View File

@ -591,9 +591,17 @@ implementation
if try_to_consume(_IMPLEMENTS) then
begin
consume(_ID);
writeln('Implements [', pattern, ']');
{$message warn unlocalized string}
if not is_interface(p.proptype.def) then
writeln('Implements property must have interface type'); //FIXME: will be converted to proper message()
begin
writeln('Implements property must have interface type');
Message1(sym_e_illegal_field, pattern);
end;
if pattern <> p.proptype.def.mangledparaname() then
begin
writeln('Implements-property must implement interface of same type');
Message1(sym_e_illegal_field, pattern);
end;
end;
{ remove temporary procvardefs }