public override BoundNode VisitLocal(BoundLocal node)
        {
            var         catchFrame = _currentAwaitCatchFrame;
            LocalSymbol hoistedLocal;

            if (catchFrame == null || !catchFrame.TryGetHoistedLocal(node.LocalSymbol, out hoistedLocal))
            {
                return(base.VisitLocal(node));
            }

            return(node.Update(hoistedLocal, node.ConstantValueOpt, hoistedLocal.Type.TypeSymbol));
        }
Exemplo n.º 2
0
            public override BoundNode VisitLocal(BoundLocal node)
            {
                if (!node.LocalSymbol.SynthesizedKind.IsLongLived())
                {
                    LocalSymbol longLived;
                    if (_tempSubstitution.TryGetValue(node.LocalSymbol, out longLived))
                    {
                        return(node.Update(longLived, node.ConstantValueOpt, node.Type));
                    }
                }

                return(base.VisitLocal(node));
            }