mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 01:19:07 +02:00
Improved syntax checks for "implements" keyword
git-svn-id: trunk@4350 -
This commit is contained in:
parent
94f3f07a97
commit
c185650955
@ -591,9 +591,17 @@ implementation
|
|||||||
if try_to_consume(_IMPLEMENTS) then
|
if try_to_consume(_IMPLEMENTS) then
|
||||||
begin
|
begin
|
||||||
consume(_ID);
|
consume(_ID);
|
||||||
writeln('Implements [', pattern, ']');
|
{$message warn unlocalized string}
|
||||||
if not is_interface(p.proptype.def) then
|
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;
|
end;
|
||||||
|
|
||||||
{ remove temporary procvardefs }
|
{ remove temporary procvardefs }
|
||||||
|
Loading…
Reference in New Issue
Block a user