mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 06:47:55 +02:00

+ test for that bug, plus another test based on it which doesn't work yet git-svn-id: trunk@8247 -
28 lines
479 B
ObjectPascal
28 lines
479 B
ObjectPascal
{$ifdef fpc}
|
|
{$mode delphi}
|
|
{$endif}
|
|
|
|
{$r-}
|
|
uses
|
|
SysUtils, Classes, TypInfo, Variants;
|
|
|
|
type
|
|
TBla = class(TPersistent)
|
|
private
|
|
fBool: Boolean;
|
|
fint: integer;
|
|
published
|
|
property Bool: Boolean read fBool write fBool;
|
|
property int: integer read fint write fint;
|
|
end;
|
|
|
|
begin
|
|
try
|
|
{ delphi gives a range error here, also if range checking is off }
|
|
SetPropValue(TBla.Create, 'Bool', 2);
|
|
except on ERangeError do
|
|
halt(0);
|
|
end;
|
|
halt(1);
|
|
end.
|