View Issue Details

IDProjectCategoryView StatusLast Update
0037480FPCDocumentationpublic2020-09-03 00:50
ReporterKai Burghardt Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSGNU/Linux 
Product Version3.0.4 
Fixed in Version3.3.1 
Summary0037480: programmer’s guide confusingly documents $scopedEnums directive
DescriptionThe programmer’s guide’s documentation of $scopedEnums suggests, that _either_ enumeration type members are inserted without a type name prefix _or_ with it. This is not the case (anymore).

The $scopedEnums directive (now) only controls, whether a _non-scoped_ alias is inserted, _too_.
All enumeration symbols are inserted with their fully-qualified name into symbol table, a short non-prefixed alias is optional.

The programmer’s guide gives the example, quote: ”The following will give an error:

begin
  A:=TMyEnum.one;
end.”

However, this works (now) and does not cause any error.
Steps To Reproduceprogram scopedEnumsDemo(input, output, stdErr);
{$scopedEnums off}
type
    namedNumber = (one, two, three);
var
    x: namedNumber;
begin
    x := one;
    // !!! _scoped_ access valid, too:
    x := namedNumber.three;
end.
TagsNo tags attached.
Fixed in Revision1741
FPCOldBugId
FPCTarget3.2.2
Attached Files

Activities

Michael Van Canneyt

2020-09-03 00:50

administrator   ~0125330

Adapted to something more clear and correct, thanks for reporting !

Issue History

Date Modified Username Field Change
2020-08-04 14:52 Kai Burghardt New Issue
2020-08-04 14:52 Kai Burghardt Status new => assigned
2020-08-04 14:52 Kai Burghardt Assigned To => Michael Van Canneyt
2020-09-03 00:50 Michael Van Canneyt Status assigned => resolved
2020-09-03 00:50 Michael Van Canneyt Resolution open => fixed
2020-09-03 00:50 Michael Van Canneyt Fixed in Version => 3.3.1
2020-09-03 00:50 Michael Van Canneyt Fixed in Revision => 1741
2020-09-03 00:50 Michael Van Canneyt FPCTarget => 3.2.2
2020-09-03 00:50 Michael Van Canneyt Note Added: 0125330