mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 18:49:49 +02:00
pastojs: fixed exit in program begin-end
git-svn-id: trunk@35905 -
This commit is contained in:
parent
c212a71dff
commit
b4a4ad725c
packages/pastojs
@ -6005,7 +6005,8 @@ begin
|
||||
begin
|
||||
// without parameter.
|
||||
ProcEl:=El.Parent;
|
||||
while not (ProcEl is TPasProcedure) do ProcEl:=ProcEl.Parent;
|
||||
while (ProcEl<>nil) and not (ProcEl is TPasProcedure) do
|
||||
ProcEl:=ProcEl.Parent;
|
||||
if ProcEl is TPasFunction then
|
||||
// in a function, "return result;"
|
||||
TJSReturnStatement(Result).Expr:=CreateBuiltInIdentifierExpr(ResolverResultVar)
|
||||
|
@ -2119,7 +2119,10 @@ begin
|
||||
' return Result;',
|
||||
'};'
|
||||
]),
|
||||
'');
|
||||
LinesToStr([
|
||||
'return;',
|
||||
'return 1;',
|
||||
'']));
|
||||
end;
|
||||
|
||||
procedure TTestModule.TestBreak;
|
||||
|
Loading…
Reference in New Issue
Block a user