public void CaptureLocalVariable (ResolveContext ec, LocalVariable local_info)
{
ec.CurrentBlock.Explicit.HasCapturedVariable = true;
if (ec.CurrentBlock.Explicit != local_info.Block.Explicit)
AddReferenceFromChildrenBlock (ec.CurrentBlock.Explicit);
if (local_info.HoistedVariant != null)
return;
HoistedVariable var = new HoistedLocalVariable (this, local_info, GetVariableMangledName (local_info));
local_info.HoistedVariant = var;
if (hoisted_locals == null)
hoisted_locals = new List<HoistedVariable> ();
hoisted_locals.Add (var);
}