bug fix #714
This commit is contained in:
parent
d471e79465
commit
4f417eaefd
11
TestSuite/lambda_exit.pas
Normal file
11
TestSuite/lambda_exit.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
begin
|
||||
var i := 0;
|
||||
var p: procedure := procedure ->
|
||||
begin
|
||||
i := 1;
|
||||
exit;
|
||||
i := 2;
|
||||
end;
|
||||
p;
|
||||
assert(i = 1);
|
||||
end.
|
||||
|
|
@ -165,7 +165,8 @@ namespace TreeConverter.LambdaExpressions.Closure
|
|||
var acceptableVarType = si.sym_info.semantic_node_type == semantic_node_type.local_variable ||
|
||||
si.sym_info.semantic_node_type == semantic_node_type.local_block_variable ||
|
||||
si.sym_info.semantic_node_type == semantic_node_type.common_parameter ||
|
||||
si.sym_info.semantic_node_type == semantic_node_type.class_field;
|
||||
si.sym_info.semantic_node_type == semantic_node_type.class_field ||
|
||||
si.sym_info.semantic_node_type == semantic_node_type.basic_function_node && idName == "exit";
|
||||
|
||||
if (!(acceptableVarType) && InLambdaContext)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue