* don't try to range check ordconst nodes being actually classes

git-svn-id: trunk@7797 -
This commit is contained in:
florian 2007-06-24 19:27:22 +00:00
parent e542a502c6
commit 03951d793a
3 changed files with 15 additions and 2 deletions

1
.gitattributes vendored
View File

@ -6333,6 +6333,7 @@ tests/tbs/tb0535.pp svneol=native#text/plain
tests/tbs/tb0536.pp svneol=native#text/plain
tests/tbs/tb0537.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/ub0069.pp svneol=native#text/plain
tests/tbs/ub0119.pp svneol=native#text/plain

View File

@ -621,8 +621,9 @@ implementation
begin
result:=nil;
resultdef:=typedef;
{ only do range checking when explicitly asked for it }
if rangecheck then
{ only do range checking when explicitly asked for it
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);
end;

11
tests/tbs/tb0539.pp Normal file
View File

@ -0,0 +1,11 @@
{$mode delphi}
const
o = TObject(0);
var
o2 : TObject;
{$r+}
begin
o2:=o;
end.