* always interpret a function name on the RHS as a recursive function

call in MacPas mode, like in TP/Delphi (mantis #22344)

git-svn-id: trunk@21817 -
This commit is contained in:
Jonas Maebe 2012-07-08 09:52:30 +00:00
parent aef81cad68
commit 1b3b097f3a
3 changed files with 26 additions and 4 deletions

1
.gitattributes vendored
View File

@ -12672,6 +12672,7 @@ tests/webtbs/tw22326.pp svneol=native#text/plain
tests/webtbs/tw22329.pp svneol=native#text/pascal
tests/webtbs/tw2233.pp svneol=native#text/plain
tests/webtbs/tw22331.pp svneol=native#text/plain
tests/webtbs/tw22344.pp svneol=native#text/plain
tests/webtbs/tw2242.pp svneol=native#text/plain
tests/webtbs/tw2250.pp svneol=native#text/plain
tests/webtbs/tw2259.pp svneol=native#text/plain

View File

@ -2199,10 +2199,7 @@ implementation
(
(token=_LKLAMMER) or
(
(
(m_tp7 in current_settings.modeswitches) or
(m_delphi in current_settings.modeswitches)
) and
(([m_tp7,m_delphi,m_mac] * current_settings.modeswitches) <> []) and
(afterassignment or in_args)
)
) then

24
tests/webtbs/tw22344.pp Normal file
View File

@ -0,0 +1,24 @@
program showbug ;
{$mode macpas}
var
glob: integer;
function countchars: INTEGER ;
begin
countchars:=255;
if glob=5 then
countchars := 0
else
begin
inc(glob);
countchars := 1 + countchars
end
end;
begin
if countchars<>5 then
halt(1);
end .