View Issue Details

IDProjectCategoryView StatusLast Update
0031224FPCPackagespublic2017-01-25 23:12
ReporterPeter DysonAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformAllOSAllOS VersionAll
Product Version3.0.0Product BuildTrunk 
Target Version3.2.0Fixed in Version3.1.1 
Summary0031224: passrc - Protected visibilty in Extended Records
DescriptionAs 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;
TagsNo tags attached.
Fixed in Revision1381
FPCOldBugId
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2017-01-14 16:38

administrator   ~0097473

Actually, this is a documentation issue:

home: >fpc tp.pp
tp.pp(6,6) Error: Visibility section "PROTECTED" not allowed in records

Peter Dyson

2017-01-14 18:17

reporter   ~0097476

Fine I will remove this from my test scenarios then.

Michael Van Canneyt

2017-01-25 23:12

administrator   ~0097712

Adapted the documentation.

Issue History

Date Modified Username Field Change
2017-01-13 19:09 Peter Dyson New Issue
2017-01-14 16:36 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-01-14 16:36 Michael Van Canneyt Status new => assigned
2017-01-14 16:38 Michael Van Canneyt Note Added: 0097473
2017-01-14 18:17 Peter Dyson Note Added: 0097476
2017-01-25 23:12 Michael Van Canneyt Fixed in Revision => 1381
2017-01-25 23:12 Michael Van Canneyt Note Added: 0097712
2017-01-25 23:12 Michael Van Canneyt Status assigned => resolved
2017-01-25 23:12 Michael Van Canneyt Fixed in Version => 3.1.1
2017-01-25 23:12 Michael Van Canneyt Resolution open => fixed
2017-01-25 23:12 Michael Van Canneyt Target Version => 3.2.0