View Issue Details

IDProjectCategoryView StatusLast Update
0036114FPCCompilerpublic2019-10-03 18:40
ReporterThaddy de KoningAssigned ToSven Barth 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.3.1Product Build43087 
Target VersionFixed in Version3.3.1 
Summary0036114: class consts are always writeable, even in {$J-} / {$writeableconsts off} state.
Descriptionclass consts are always writeable, even in {$J-} / {$writeableconsts off} state.
Also over unit boundaries.
Steps To Reproduce{$mode objfpc}{$H+}{$J-}
type
  TTestme=class
  strict private
  const
  {$push}{$writeableconst off} // superfluous but also doesn't work
    c_one:integer = 1;
    c_two:integer = 10;
  {$pop}
  public
  class property one:integer read c_one;
  class property two:integer read c_two;
  end;

begin
  TTestme.c_one := 1000;
  writeln(TTestme.One);
end.
Additional InformationIf you separate the example class into a single unit, the results are the same.
TagsNo tags attached.
Fixed in Revision43116
FPCOldBugId
FPCTarget-
Attached Files

Activities

Sven Barth

2019-10-03 18:40

manager   ~0118284

Please test and close if okay.

Issue History

Date Modified Username Field Change
2019-09-29 13:32 Thaddy de Koning New Issue
2019-10-03 16:49 Sven Barth Assigned To => Sven Barth
2019-10-03 16:49 Sven Barth Status new => assigned
2019-10-03 18:40 Sven Barth Status assigned => resolved
2019-10-03 18:40 Sven Barth Resolution open => fixed
2019-10-03 18:40 Sven Barth Fixed in Version => 3.3.1
2019-10-03 18:40 Sven Barth Fixed in Revision => 43116
2019-10-03 18:40 Sven Barth FPCTarget => -
2019-10-03 18:40 Sven Barth Note Added: 0118284