mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 06:29:16 +02:00
+ support for "return" without return value in MacPas mode
git-svn-id: trunk@4933 -
This commit is contained in:
parent
d72a49fad0
commit
12c76ca1ce
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6003,6 +6003,7 @@ tests/tbs/tb0501.pp svneol=native#text/plain
|
|||||||
tests/tbs/tb0502.pp svneol=native#text/plain
|
tests/tbs/tb0502.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0503.pp svneol=native#text/plain
|
tests/tbs/tb0503.pp svneol=native#text/plain
|
||||||
tests/tbs/tb0504.pp svneol=native#text/plain
|
tests/tbs/tb0504.pp svneol=native#text/plain
|
||||||
|
tests/tbs/tb0505.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
|
||||||
|
@ -2120,7 +2120,10 @@ implementation
|
|||||||
_RETURN :
|
_RETURN :
|
||||||
begin
|
begin
|
||||||
consume(_RETURN);
|
consume(_RETURN);
|
||||||
p1 := cexitnode.create(comp_expr(true));
|
if not(token in [_SEMICOLON,_ELSE,_END]) then
|
||||||
|
p1 := cexitnode.create(comp_expr(true))
|
||||||
|
else
|
||||||
|
p1 := cexitnode.create(nil);
|
||||||
end;
|
end;
|
||||||
_INHERITED :
|
_INHERITED :
|
||||||
begin
|
begin
|
||||||
|
10
tests/tbs/tb0505.pp
Normal file
10
tests/tbs/tb0505.pp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{$mode macpas}
|
||||||
|
|
||||||
|
procedure test;
|
||||||
|
begin
|
||||||
|
return;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
test;
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user