[mono/mono] [2 commits] c5d12785: Update failing tests
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <000001427cc85152-30780358-582c-4299-b258-0833e875f408-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/1a8004315c0d...86d6b6f7ca72
Commit: c5d1278525f823767478755c4a7c628e3484a53c
Author: Marek Safar <[email protected]> (marek-safar)
Date: 2013-11-21 20:06:53 GMT
URL: https://github.com/mono/mono/commit/c5d1278525f823767478755c4a7c628e3484a53c
Update failing tests
Changed paths:
M mcs/errors/known-issues-net_4_5
Modified: mcs/errors/known-issues-net_4_5
===================================================================
@@ -17,3 +17,7 @@ cs0080.cs
# Operators
cs0457-2.cs
cs0457.cs
+
+cs1060.cs NO ERROR
+cs1060-2.cs NO ERROR
+cs1060-3.cs NO ERROR
Commit: 86d6b6f7ca7235c284ea6ec24f09eda837a6debd
Author: Marek Safar <[email protected]> (marek-safar)
Date: 2013-11-21 20:06:54 GMT
URL: https://github.com/mono/mono/commit/86d6b6f7ca7235c284ea6ec24f09eda837a6debd
[mcs] Flow analysis of conditional expression
Changed paths:
M mcs/mcs/expression.cs
Added paths:
A mcs/errors/cs0165-27.cs
Added: mcs/errors/cs0165-27.cs
===================================================================
@@ -0,0 +1,15 @@
+// CS0165: Use of unassigned local variable `a'
+// Line: 13
+
+using System;
+
+class Program
+{
+ public static void Main (string[] args)
+ {
+ int a, b;
+ string s = "";
+ var res = s != null ? a = 1 : b = 2;
+ Console.WriteLine (a);
+ }
+}
Modified: mcs/mcs/expression.cs
===================================================================
@@ -5410,10 +5410,17 @@ public override void Emit (EmitContext ec)
public override void FlowAnalysis (FlowAnalysisContext fc)
{
- // FIXME: Need to branch
expr.FlowAnalysis (fc);
+ var expr_fc = fc.DefiniteAssignment;
+
+ fc.DefiniteAssignment = new DefiniteAssignmentBitSet (expr_fc);
true_expr.FlowAnalysis (fc);
+ var true_fc = fc.DefiniteAssignment;
+
+ fc.DefiniteAssignment = new DefiniteAssignmentBitSet (expr_fc);
false_expr.FlowAnalysis (fc);
+
+ fc.DefiniteAssignment &= true_fc;
}
protected override void CloneTo (CloneContext clonectx, Expression t)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches