passrc - Protected visibilty in Extended Records
Original Reporter info from Mantis: dyspd
-
Reporter name: Peter Dyson
Original Reporter info from Mantis: dyspd
- Reporter name: Peter Dyson
Description:
As stated in FPC docs http://www.freepascal.org/docs-html/ref/refse57.html#x118-1400009.1
TTest4 = record
private
a : Integer;
protected <<< this is allowed
function getp : integer;
public
b : string;
procedure setp (aValue : integer);
property p : integer read Getp Write SetP;
public
case x : integer of
1 : (Q : string);
2 : (S : String);
end;
At the moment passrc complains about the protected visibility.
This is a one word fix in PParser add visProtected as below.
Source from Trunk
4521 begin
4522 If not (po_delphi in Scanner.Options) then
4523 ParseExc(nErrRecordVisibilityNotAllowed,SErrRecordVisibilityNotAllowed);
4524 if not (v in [visPrivate,visPublic,visStrictPrivate,visProtected]) then
4525 ParseExc(nParserInvalidRecordVisibility,SParserInvalidRecordVisibility);
4526 NextToken;
4527 Continue;
4528 end;
Mantis conversion info:
- Mantis ID: 31224
- OS: All
- OS Build: All
- Build: Trunk
- Platform: All
- Version: 3.0.0
- Fixed in version: 3.1.1
- Fixed in revision: 1381 (#e3bcd785)
- Target version: 3.2.0