Compiler allows wrong property declaration
Original Reporter info from Mantis: michael @mvancanneyt
-
Reporter name: Michael Van Canneyt
Original Reporter info from Mantis: michael @mvancanneyt
- Reporter name: Michael Van Canneyt
Description:
The following compiles without error:
{mode objfpc}<br/> {h+}
Type
TMyObject = Class(TObject)
Property MyProp : TObject;
end;
begin
end.
Delphi gives an error "READ or WRITE Clause expected, but 'END' found."
Which is the correct behaviour, as the declaration is wrong.
Steps to reproduce:
Compile the above, it will work.
It should fail with a parser error.
Mantis conversion info:
- Mantis ID: 26011
- OS: All
- OS Build: All
- Platform: All
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 27966 (#159a35da)