if (rc.HasSet (ResolveContext.Options.CheckedScope))
flags |= ResolveContext.Options.CheckedScope;
+
+ if (rc.IsInProbingMode)
+ flags |= ResolveContext.Options.ProbingMode;
+
+ if (rc.HasSet (ResolveContext.Options.FieldInitializerScope))
+ flags |= ResolveContext.Options.FieldInitializerScope;
+
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion))
+ flags |= ResolveContext.Options.ExpressionTreeConversion;
+
+ if (rc.HasSet (ResolveContext.Options.BaseInitializer))
+ flags |= ResolveContext.Options.BaseInitializer;
}
public override FlowBranching CurrentBranching {
get { return return_type; }
}
+ public bool IsUnreachable {
+ get {
+ return HasSet (Options.UnreachableScope);
+ }
+ set {
+ flags = value ? flags | Options.UnreachableScope : flags & ~Options.UnreachableScope;
+ }
+ }
+
+ public bool UnreachableReported {
+ get {
+ return HasSet (Options.UnreachableReported);
+ }
+ set {
+ flags = value ? flags | Options.UnreachableReported : flags & ~Options.UnreachableScope;
+ }
+ }
+
// <summary>
// Starts a new code branching. This inherits the state of all local
// variables and parameters from the current branching.
LockScope = 1 << 13,
+ UnreachableScope = 1 << 14,
+
+ UnreachableReported = 1 << 15,
+
/// <summary>
/// Whether control flow analysis is enabled
/// </summary>