+ add a tcallnodeflag value that prohibits the tcallnode.pass_typecheck to return a procvar in case of a call without parameters with a found symbol, but no suitable procdef

This commit is contained in:
Sven/Sarah Barth 2023-06-30 17:11:43 +02:00
parent c7776d899b
commit 78025d90b3

View File

@ -58,7 +58,8 @@ interface
(to prevent it from potentially happening again in a wrong context in case of constant propagation or so) }
cnf_ignore_visibility, { internally generated call that should ignore visibility checks }
cnf_check_fpu_exceptions, { after the call fpu exceptions shall be checked }
cnf_ignore_devirt_wpo { ignore this call for devirtualisation info tracking: calls to newinstance generated by the compiler do not result in extra class types being instanced }
cnf_ignore_devirt_wpo, { ignore this call for devirtualisation info tracking: calls to newinstance generated by the compiler do not result in extra class types being instanced }
cnf_no_convert_procvar { don't convert a procdef to a procvar }
);
tcallnodeflags = set of tcallnodeflag;
@ -3775,7 +3776,7 @@ implementation
{ in tp mode we can try to convert to procvar if
there are no parameters specified }
if not(assigned(left)) and
not(cnf_inherited in callnodeflags) and
([cnf_inherited,cnf_no_convert_procvar]*callnodeflags=[]) and
((m_tp_procvar in current_settings.modeswitches) or
(m_mac_procvar in current_settings.modeswitches)) and
(not assigned(methodpointer) or