"default" as identifier name depends on previous statement (property)
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
Fpc accepts "var default: Integer".
This is withone exception, if the previous statement was a property, which does not have a default flag.
Example 1 - compiles fine
TForm1 = class(TForm)
private
function getx(i: integer): boolean;
public
property x [i:integer]: boolean read getx; default;
default : integer;
end;
Example 2 - Error
TForm1 = class(TForm)
private
function getx(i: integer): boolean;
public
property x [i:integer]: boolean read getx; // not a default property
default : integer; // error: semicolon expected
end;
Mantis conversion info:
- Mantis ID: 13971
- Version: 2.2.4
- Fixed in version: 2.4.0
- Fixed in revision: 13334 (#c6733ed9)