On Monday, 13 June 2022 at 09:12:47 UTC, user1234 wrote:
>On Monday, 13 June 2022 at 09:09:08 UTC, user1234 wrote:
>On Monday, 13 June 2022 at 08:13:14 UTC, claptrap wrote:
>[...]
True but ObjFPC has strict private
too since a while: demo.
This does exactly what is discussed on the D forum since a week.
well the online compilers are too old, but if you try this code with a more recent compiler
{$MODE OBJFPC}{$H+}
{$MODESWITCH ADVANCEDRECORDS}
type TS = record
private
a: integer;
strict private
b: integer;
end;
var
s: TS;
begin
s.a := 1; // OK
s.b := 1; // NG
end.
this gives
>project1.lpr(15,5) Error: identifier idents no member "b"
You should have used compiler explorer. :)