mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 20:09:18 +02:00
* fixed passing function results to const formal defs, see tbs/tb0490.pp
git-svn-id: trunk@56 -
This commit is contained in:
parent
3043719d2b
commit
ac880214fc
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -4959,6 +4959,7 @@ tests/tbs/tb0486.pp svneol=native#text/plain
|
|||||||
tests/tbs/tb0487.pp svneol=native#text/plain
|
tests/tbs/tb0487.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0488.pp svneol=native#text/plain
|
tests/tbs/tb0488.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0489.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/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
|
||||||
|
@ -1096,6 +1096,9 @@ implementation
|
|||||||
(valid_addr in opts) and
|
(valid_addr in opts) and
|
||||||
(hp.resulttype.def.deftype=stringdef) then
|
(hp.resulttype.def.deftype=stringdef) then
|
||||||
result:=true
|
result:=true
|
||||||
|
else
|
||||||
|
if valid_const in opts then
|
||||||
|
result:=true
|
||||||
else
|
else
|
||||||
CGMessagePos(hp.fileinfo,errmsg);
|
CGMessagePos(hp.fileinfo,errmsg);
|
||||||
exit;
|
exit;
|
||||||
|
17
tests/tbs/tb0490.pp
Normal file
17
tests/tbs/tb0490.pp
Normal 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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user