pascalabcnet/TestSuite/units/u_classprops1.pas
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

18 lines
278 B
ObjectPascal

unit u_classprops1;
type TClass = class
class a : integer := 4;
class constructor Create;
begin
assert(a=4);
end;
class property Prop1 : integer read a write a;
end;
var t : TClass;
begin
t := new TClass();
TClass.Prop1 := 6;
assert(TClass.Prop1=6);
assert(TClass.a = 6);
end.