Fix Firebird 'make dist' and build
[mono.git] / mcs / gmcs / flowanalysis.cs
index 7a3efad149aefb4abb9b77ff34b525cebeadf66d..fac60a500f305dc6a386406e02ebcbf30dfa7229 100644 (file)
@@ -1899,7 +1899,9 @@ namespace Mono.CSharp
 
                public bool IsAssigned (EmitContext ec)
                {
-                       return !ec.DoFlowAnalysis || ec.CurrentBranching.IsAssigned (this);
+                       return !ec.DoFlowAnalysis ||
+                               ec.OmitStructFlowAnalysis && TypeInfo.IsStruct ||
+                               ec.CurrentBranching.IsAssigned (this);
                }
 
                public bool IsAssigned (EmitContext ec, Location loc)
@@ -1959,7 +1961,9 @@ namespace Mono.CSharp
 
                public bool IsFieldAssigned (EmitContext ec, string name, Location loc)
                {
-                       if (!ec.DoFlowAnalysis || ec.CurrentBranching.IsFieldAssigned (this, name))
+                       if (!ec.DoFlowAnalysis ||
+                               ec.OmitStructFlowAnalysis && TypeInfo.IsStruct ||
+                               ec.CurrentBranching.IsFieldAssigned (this, name))
                                return true;
 
                        Report.Error (170, loc,