本文整理汇总了C#中Mono.CSharp.EmitContext.KillFlowBranching方法的典型用法代码示例。如果您正苦于以下问题:C# EmitContext.KillFlowBranching方法的具体用法?C# EmitContext.KillFlowBranching怎么用?C# EmitContext.KillFlowBranching使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.CSharp.EmitContext
的用法示例。
在下文中一共展示了EmitContext.KillFlowBranching方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveUnreachable
/// <summary>
/// We already know that the statement is unreachable, but we still
/// need to resolve it to catch errors.
/// </summary>
public virtual bool ResolveUnreachable (EmitContext ec, bool warn)
{
//
// This conflicts with csc's way of doing this, but IMHO it's
// the right thing to do.
//
// If something is unreachable, we still check whether it's
// correct. This means that you cannot use unassigned variables
// in unreachable code, for instance.
//
if (warn)
Report.Warning (162, 2, loc, "Unreachable code detected");
ec.StartFlowBranching (FlowBranching.BranchingType.Block, loc);
bool ok = Resolve (ec);
ec.KillFlowBranching ();
return ok;
}