fix #2046
This commit is contained in:
parent
0d0e522765
commit
50d02c2340
7
TestSuite/lambda_OnExcept_2.pas
Normal file
7
TestSuite/lambda_OnExcept_2.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
begin
|
||||||
|
var p: procedure := ()->begin end;
|
||||||
|
try
|
||||||
|
except
|
||||||
|
on Exception do
|
||||||
|
end;
|
||||||
|
end.
|
||||||
|
|
@ -149,8 +149,9 @@ namespace TreeConverter.LambdaExpressions.Closure
|
||||||
_visitor.convertion_data_and_alghoritms.statement_list_stack_push(sl);
|
_visitor.convertion_data_and_alghoritms.statement_list_stack_push(sl);
|
||||||
|
|
||||||
_visitor.context.enter_code_block_without_bind();
|
_visitor.context.enter_code_block_without_bind();
|
||||||
|
|
||||||
_visitor.context.add_var_definition(eh.variable.name, _visitor.get_location(eh.variable), _visitor.convert_strong(eh.type_name), PascalABCCompiler.SemanticTree.polymorphic_state.ps_common, true);
|
if (eh.variable != null)
|
||||||
|
_visitor.context.add_var_definition(eh.variable.name, _visitor.get_location(eh.variable), _visitor.convert_strong(eh.type_name), PascalABCCompiler.SemanticTree.polymorphic_state.ps_common, true);
|
||||||
//SymbolInfo si = _visitor.context.find_first(eh.variable.name);
|
//SymbolInfo si = _visitor.context.find_first(eh.variable.name);
|
||||||
//var csi = new CapturedVariablesTreeNode.CapturedSymbolInfo(eh, si);
|
//var csi = new CapturedVariablesTreeNode.CapturedSymbolInfo(eh, si);
|
||||||
//_currentTreeNode.VariablesDefinedInScope.Add(new CapturedVariablesTreeNode.CapturedSymbolInfo(eh, si));
|
//_currentTreeNode.VariablesDefinedInScope.Add(new CapturedVariablesTreeNode.CapturedSymbolInfo(eh, si));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue