This commit is contained in:
Mikhalkovich Stanislav 2019-07-24 21:31:58 +03:00
parent 0d0e522765
commit 50d02c2340
2 changed files with 10 additions and 2 deletions

View file

@ -0,0 +1,7 @@
begin
var p: procedure := ()->begin end;
try
except
on Exception do
end;
end.

View file

@ -149,8 +149,9 @@ namespace TreeConverter.LambdaExpressions.Closure
_visitor.convertion_data_and_alghoritms.statement_list_stack_push(sl);
_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);
//var csi = new CapturedVariablesTreeNode.CapturedSymbolInfo(eh, si);
//_currentTreeNode.VariablesDefinedInScope.Add(new CapturedVariablesTreeNode.CapturedSymbolInfo(eh, si));