mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-28 11:21:42 +01:00
* don't try to range check ordconst nodes being actually classes
git-svn-id: trunk@7797 -
This commit is contained in:
parent
e542a502c6
commit
03951d793a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6333,6 +6333,7 @@ tests/tbs/tb0535.pp svneol=native#text/plain
|
|||||||
tests/tbs/tb0536.pp svneol=native#text/plain
|
tests/tbs/tb0536.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0537.pp svneol=native#text/plain
|
tests/tbs/tb0537.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0538.pp svneol=native#text/plain
|
tests/tbs/tb0538.pp svneol=native#text/plain
|
||||||
|
tests/tbs/tb0539.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
|
||||||
tests/tbs/ub0119.pp svneol=native#text/plain
|
tests/tbs/ub0119.pp svneol=native#text/plain
|
||||||
|
|||||||
@ -621,8 +621,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
result:=nil;
|
result:=nil;
|
||||||
resultdef:=typedef;
|
resultdef:=typedef;
|
||||||
{ only do range checking when explicitly asked for it }
|
{ only do range checking when explicitly asked for it
|
||||||
if rangecheck then
|
and if the type can be range checked, see tests/tbs/tb0539.pp }
|
||||||
|
if rangecheck and (resultdef.typ in [orddef,enumdef]) then
|
||||||
testrange(resultdef,value,false);
|
testrange(resultdef,value,false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
11
tests/tbs/tb0539.pp
Normal file
11
tests/tbs/tb0539.pp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{$mode delphi}
|
||||||
|
const
|
||||||
|
o = TObject(0);
|
||||||
|
|
||||||
|
var
|
||||||
|
o2 : TObject;
|
||||||
|
|
||||||
|
{$r+}
|
||||||
|
begin
|
||||||
|
o2:=o;
|
||||||
|
end.
|
||||||
Loading…
Reference in New Issue
Block a user