Skip to content

strict private class var: visibility

Original Reporter info from Mantis: md @mdbs99
  • Reporter name: Marcos Douglas

Description:

I can access a scrict private class var in any place on the code.

Steps to reproduce:

Consider the code below:

unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils;

type
  TFoo = class
  strict private
    class var FProp: Integer;
  end;

implementation

procedure Test;
var
  f: TFoo;
begin
  f := TFoo.Create;
  f.FProp := 10;
  f.Free;
end;

end.

Mantis conversion info:

  • Mantis ID: 22252
  • OS: Windows
  • OS Build: XP/7
  • Build: r21495
  • Platform: i386/x86_64
  • Version: 2.6.1
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information