* fixed passing function results to const formal defs, see tbs/tb0490.pp

git-svn-id: trunk@56 -
This commit is contained in:
florian 2005-05-21 20:44:04 +00:00
parent 3043719d2b
commit ac880214fc
3 changed files with 21 additions and 0 deletions

1
.gitattributes vendored
View File

@ -4959,6 +4959,7 @@ tests/tbs/tb0486.pp svneol=native#text/plain
tests/tbs/tb0487.pp svneol=native#text/plain
tests/tbs/tb0488.pp svneol=native#text/plain
tests/tbs/tb0489.pp svneol=native#text/plain
tests/tbs/tb0490.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

@ -1096,6 +1096,9 @@ implementation
(valid_addr in opts) and
(hp.resulttype.def.deftype=stringdef) then
result:=true
else
if valid_const in opts then
result:=true
else
CGMessagePos(hp.fileinfo,errmsg);
exit;

17
tests/tbs/tb0490.pp Normal file
View File

@ -0,0 +1,17 @@
type
trecord = record
l : longint;
end;
function test : trecord;
begin
end;
procedure p(const c);
begin
end;
begin
p(test);
end.