Mono.CSharp.BlockContext.KillFlowBranching C# (CSharp) Method

KillFlowBranching() public method

Kills the current code branching. This throws away any changed state information and should only be used in case of an error.
public KillFlowBranching ( ) : void
return void
		public void KillFlowBranching ()
		{
			current_flow_branching = current_flow_branching.Parent;
		}

Usage Example

Example #1
0
		/// <summary>
		///   We already know that the statement is unreachable, but we still
		///   need to resolve it to catch errors.
		/// </summary>
		public virtual bool ResolveUnreachable (BlockContext 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)
				ec.Report.Warning (162, 2, loc, "Unreachable code detected");

			ec.StartFlowBranching (FlowBranching.BranchingType.Block, loc);
			bool ok = Resolve (ec);
			ec.KillFlowBranching ();

			return ok;
		}
All Usage Examples Of Mono.CSharp.BlockContext::KillFlowBranching