mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 02:32:13 +02:00
* do not convert procvars with void return to callnode
This commit is contained in:
parent
0cb3160a63
commit
0e0a581230
@ -1215,12 +1215,14 @@ implementation
|
|||||||
loadn :
|
loadn :
|
||||||
begin
|
begin
|
||||||
{ tp7 procvar support, when right is not a procvardef and we got a
|
{ tp7 procvar support, when right is not a procvardef and we got a
|
||||||
loadn of a procvar then convert to a calln, the check for the
|
loadn of a procvar (ignore procedures as void can not be converted)
|
||||||
result is already done in is_convertible, also no conflict with
|
then convert to a calln, the check for the result is already done
|
||||||
@procvar is here because that has an extra addrn }
|
in is_convertible, also no conflict with @procvar is here because
|
||||||
|
that has an extra addrn }
|
||||||
if (m_tp_procvar in aktmodeswitches) and
|
if (m_tp_procvar in aktmodeswitches) and
|
||||||
(resulttype.def.deftype<>procvardef) and
|
(resulttype.def.deftype<>procvardef) and
|
||||||
(left.resulttype.def.deftype=procvardef) then
|
(left.resulttype.def.deftype=procvardef) and
|
||||||
|
(not is_void(tprocvardef(left.resulttype.def).rettype.def)) then
|
||||||
begin
|
begin
|
||||||
hp:=ccallnode.create(nil,nil,nil,nil);
|
hp:=ccallnode.create(nil,nil,nil,nil);
|
||||||
tcallnode(hp).set_procvar(left);
|
tcallnode(hp).set_procvar(left);
|
||||||
@ -2031,7 +2033,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.103 2003-03-17 18:54:23 peter
|
Revision 1.104 2003-04-22 09:52:30 peter
|
||||||
|
* do not convert procvars with void return to callnode
|
||||||
|
|
||||||
|
Revision 1.103 2003/03/17 18:54:23 peter
|
||||||
* fix missing self setting for method to procvar conversion in
|
* fix missing self setting for method to procvar conversion in
|
||||||
tp_procvar mode
|
tp_procvar mode
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user