record const as prop



record_const_as_prop
Smart pascal source code
type TBase = record Field: Boolean; class const c1 = 1; const c2 = 2; property p1: Integer read c1; property p2: Integer read c2; end; var o: TBase; WriteLn(TBase.p1); WriteLn(TBase.p2); WriteLn(o.p1); WriteLn(o.p2); {<<< RESULT - CONSOLE LOG >>> ----------------------------- Errors >>>> Hint: "P1" does not match case of declaration ("p1") [line: 12, column: 15] Hint: "P2" does not match case of declaration ("p2") [line: 13, column: 15] Hint: "P1" does not match case of declaration ("p1") [line: 15, column: 11] Hint: "P2" does not match case of declaration ("p2") [line: 16, column: 11] Result >>>> 1 2 1 2 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}