parent
7f52cc8c5b
commit
aa3242524a
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "5";
|
||||
public const string Build = "0";
|
||||
public const string Revision = "2111";
|
||||
public const string Revision = "2114";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=5
|
||||
%REVISION%=2111
|
||||
%COREVERSION%=0
|
||||
%REVISION%=2114
|
||||
%MINOR%=5
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
//
|
||||
// This CSharp output file generated by Gardens Point LEX
|
||||
// Version: 1.1.3.301
|
||||
// Machine: DESKTOP-IF20NRO
|
||||
// DateTime: 6/15/2019 8:40:57 AM
|
||||
// UserName: FatCow
|
||||
// Machine: DESKTOP-G8V08V4
|
||||
// DateTime: 18.06.2019 14:40:06
|
||||
// UserName: ?????????
|
||||
// GPLEX input file <ABCPascal.lex>
|
||||
// GPLEX frame file <embedded resource>
|
||||
//
|
||||
|
|
|
|||
|
|
@ -4675,14 +4675,10 @@ common_lambda_body
|
|||
{
|
||||
$$ = new statement_list($1 as statement, @$);
|
||||
}
|
||||
| yield_stmt
|
||||
/*| yield_stmt
|
||||
{
|
||||
$$ = new statement_list($1 as statement, @$);
|
||||
}
|
||||
| raise_stmt
|
||||
{
|
||||
$$ = new statement_list($1 as statement, @$);
|
||||
}
|
||||
}*/
|
||||
;
|
||||
|
||||
|
||||
|
|
@ -4713,6 +4709,10 @@ lambda_procedure_body
|
|||
{
|
||||
$$ = new statement_list($1 as statement, @$);
|
||||
}
|
||||
| raise_stmt
|
||||
{
|
||||
$$ = new statement_list($1 as statement, @$);
|
||||
}
|
||||
| common_lambda_body
|
||||
{
|
||||
$$ = $1;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -7,7 +7,6 @@
|
|||
<name value="const_simple_expr" />
|
||||
<name value="as_is_constexpr" />
|
||||
<name value="const_factor" />
|
||||
<name value="const_variable" />
|
||||
<name value="const_variable_2" />
|
||||
<name value="unsigned_number" />
|
||||
<name value="typed_const" />
|
||||
|
|
@ -137,7 +136,6 @@
|
|||
<name value="record_const" />
|
||||
<name value="const_simple_expr" />
|
||||
<name value="as_is_constexpr" />
|
||||
<name value="const_variable" />
|
||||
<name value="const_variable_2" />
|
||||
<name value="optional_array_initializer" />
|
||||
<name value="literal_or_number" />
|
||||
|
|
@ -157,7 +155,6 @@
|
|||
<name value="const_elem" />
|
||||
<name value="literal_or_number" />
|
||||
<name value="const_simple_expr" />
|
||||
<name value="const_variable" />
|
||||
<name value="one_literal" />
|
||||
<name value="literal" />
|
||||
<name value="literal_list" />
|
||||
|
|
|
|||
|
|
@ -242,5 +242,6 @@ script=
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.5.0.2111'
|
||||
!define VERSION '3.5.0.2114'
|
||||
|
|
|
|||
8
TestSuite/lambda_func_with_Result_1.pas
Normal file
8
TestSuite/lambda_func_with_Result_1.pas
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
begin
|
||||
var p: ()->boolean := ()->
|
||||
begin
|
||||
case 0 of
|
||||
0: Result := true;
|
||||
end
|
||||
end;
|
||||
end.
|
||||
11
TestSuite/lambda_func_with_Result_2.pas
Normal file
11
TestSuite/lambda_func_with_Result_2.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
procedure p1(f: real-> real) := exit;
|
||||
|
||||
begin
|
||||
p1(r ->
|
||||
begin
|
||||
try
|
||||
Result := r;
|
||||
except
|
||||
end;
|
||||
end);
|
||||
end.
|
||||
|
|
@ -19394,7 +19394,11 @@ namespace PascalABCCompiler.TreeConverter
|
|||
if (!stl.expr_lambda_body) // SSM 26.11.18
|
||||
// значит, первый и единственный оператор - не присваивание и это лямбда - процедура!
|
||||
{
|
||||
_function_lambda_definition.return_type = null;
|
||||
var rns = new LambdaHelper.ResultNodesSearcher(_function_lambda_definition.proc_body);
|
||||
if (rns.exprList.Count == 0) // Значит, это процедура, т.к. в блоке begin-end нет ни одного result := ...
|
||||
{
|
||||
_function_lambda_definition.return_type = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_function_lambda_definition.return_type is lambda_inferred_type && stl != null && stl.list.Count > 1 && _function_lambda_definition.usedkeyword == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue