mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 12:50:31 +02:00
* workaround for default property constant value limitations
git-svn-id: trunk@10575 -
This commit is contained in:
parent
03de1511ab
commit
7e4750ac50
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6830,6 +6830,7 @@ tests/tbs/tb0543.pp svneol=native#text/plain
|
|||||||
tests/tbs/tb0544.pp svneol=native#text/plain
|
tests/tbs/tb0544.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0545.pp svneol=native#text/plain
|
tests/tbs/tb0545.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0546.pp svneol=native#text/plain
|
tests/tbs/tb0546.pp svneol=native#text/plain
|
||||||
|
tests/tbs/tb0547.pp svneol=native#text/plain
|
||||||
tests/tbs/tb205.pp svneol=native#text/plain
|
tests/tbs/tb205.pp svneol=native#text/plain
|
||||||
tests/tbs/ub0060.pp svneol=native#text/plain
|
tests/tbs/ub0060.pp svneol=native#text/plain
|
||||||
tests/tbs/ub0069.pp svneol=native#text/plain
|
tests/tbs/ub0069.pp svneol=native#text/plain
|
||||||
|
@ -605,8 +605,8 @@ implementation
|
|||||||
setconstn :
|
setconstn :
|
||||||
p.default:=plongint(tsetconstnode(pt).value_set)^;
|
p.default:=plongint(tsetconstnode(pt).value_set)^;
|
||||||
ordconstn :
|
ordconstn :
|
||||||
if (Tordconstnode(pt).value<int64(low(p.default))) or
|
if (Tordconstnode(pt).value<int64(low(longint))) or
|
||||||
(Tordconstnode(pt).value>int64(high(p.default))) then
|
(Tordconstnode(pt).value>int64(high(cardinal))) then
|
||||||
message(parser_e_range_check_error)
|
message(parser_e_range_check_error)
|
||||||
else
|
else
|
||||||
p.default:=longint(tordconstnode(pt).value.svalue);
|
p.default:=longint(tordconstnode(pt).value.svalue);
|
||||||
|
21
tests/tbs/tb0547.pp
Normal file
21
tests/tbs/tb0547.pp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ %norun }
|
||||||
|
|
||||||
|
program rangeerror;
|
||||||
|
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
|
||||||
|
{$ifdef mswindows}{$apptype console}{$endif}
|
||||||
|
uses
|
||||||
|
{$ifdef FPC}{$ifdef linux}cthreads,{$endif}{$endif}
|
||||||
|
sysutils;
|
||||||
|
type
|
||||||
|
colorty = type longword;
|
||||||
|
const
|
||||||
|
cl_mapped = colorty($90000000);
|
||||||
|
type
|
||||||
|
ttestclass = class
|
||||||
|
private
|
||||||
|
fcolor: colorty;
|
||||||
|
published
|
||||||
|
property color: colorty read fcolor write fcolor default cl_mapped; //<<--
|
||||||
|
end;
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user