X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fgmcs%2Fflowanalysis.cs;h=fac60a500f305dc6a386406e02ebcbf30dfa7229;hb=bd316288ae3fa0cb6f03b367716d04d5244c5d04;hp=7a3efad149aefb4abb9b77ff34b525cebeadf66d;hpb=675ed0f76f4c711f4d1d38183bda62c07ad9dfa6;p=mono.git diff --git a/mcs/gmcs/flowanalysis.cs b/mcs/gmcs/flowanalysis.cs index 7a3efad149a..fac60a500f3 100644 --- a/mcs/gmcs/flowanalysis.cs +++ b/mcs/gmcs/flowanalysis.cs @@ -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,