Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/8113f9b2379f...a55758d13614
Commit: 87d6328f2fa219d97ee95a529cd4cfe29f9a64cf
Author: Marek Safar <[email protected]> (marek-safar)
Date: 2013-10-10 14:09:31 GMT
URL: https://github.com/mono/mono/commit/87d6328f2fa219d97ee95a529cd4cfe29f9a64cf
Better debugger visualization for .net 1.1 style custom collections
Changed paths:
M mcs/class/corlib/System.Collections/CollectionBase.cs
Modified: mcs/class/corlib/System.Collections/CollectionBase.cs
===================================================================
@@ -37,6 +37,8 @@ namespace System.Collections {
[ComVisible(true)]
[Serializable]
+ [System.Diagnostics.DebuggerDisplay ("Count={Count}")]
+ [System.Diagnostics.DebuggerTypeProxy (typeof (CollectionDebuggerView))]
#if INSIDE_CORLIB
public
#else
Commit: a55758d13614755cc875446f5039daa9e725d4f3
Author: Marek Safar <[email protected]> (marek-safar)
Date: 2013-10-10 14:09:31 GMT
URL: https://github.com/mono/mono/commit/a55758d13614755cc875446f5039daa9e725d4f3
Compound assignment of optimized binary constant needs to decompose it first. Fixes #15315
Changed paths:
M mcs/mcs/assign.cs
M mcs/mcs/ecore.cs
M mcs/tests/gtest-540.cs
M mcs/tests/ver-il-net_4_5.xml
Added paths:
A mcs/errors/cs0458-17.cs
A mcs/tests/test-870.cs
Removed paths:
D mcs/errors/cs0037-8.cs
Removed: mcs/errors/cs0037-8.cs
===================================================================
@@ -1,11 +0,0 @@
-// CS0037: Cannot convert null to `int' because it is a value type
-// Line: 9
-
-class C
-{
- public static void Main ()
- {
- int i = 44;
- i <<= null;
- }
-}
Added: mcs/errors/cs0458-17.cs
===================================================================
@@ -0,0 +1,12 @@
+// CS0458: The result of the expression is always `null' of type `int?'
+// Line: 10
+// Compiler options: -warnaserror -warn:2
+
+class C
+{
+ public static void Main ()
+ {
+ int i = 44;
+ i <<= null;
+ }
+}
Modified: mcs/mcs/assign.cs
===================================================================
@@ -807,7 +807,9 @@ protected override Expression ResolveConversions (ResolveContext ec)
if (b == null) {
if (source is ReducedExpression)
b = ((ReducedExpression) source).OriginalExpression as Binary;
- else if (source is Nullable.LiftedBinaryOperator) {
+ else if (source is ReducedExpression.ReducedConstantExpression) {
+ b = ((ReducedExpression.ReducedConstantExpression) source).OriginalExpression as Binary;
+ } else if (source is Nullable.LiftedBinaryOperator) {
var po = ((Nullable.LiftedBinaryOperator) source);
if (po.UserOperator == null)
b = po.Binary;
Modified: mcs/mcs/ecore.cs
===================================================================
@@ -2057,6 +2057,12 @@ public ReducedConstantExpression (Constant expr, Expression orig_expr)
this.orig_expr = orig_expr;
}
+ public Expression OriginalExpression {
+ get {
+ return orig_expr;
+ }
+ }
+
public override Constant ConvertImplicitly (TypeSpec target_type)
{
Constant c = base.ConvertImplicitly (target_type);
Modified: mcs/tests/gtest-540.cs
===================================================================
@@ -88,4 +88,13 @@ public static int Main ()
return 0;
}
+
+ // This does not look right but C# spec needs tidying up to special case it
+ void BrokenLiftedNull ()
+ {
+ int i = 44;
+ int? u = null;
+ i <<= u;
+ i <<= null;
+ }
}
\ No newline at end of file
Added: mcs/tests/test-870.cs
===================================================================
@@ -0,0 +1,17 @@
+public class Test
+{
+ static void Foo (ushort p)
+ {
+ p = 0x0000;
+ p |= 0x0000;
+ p &= 0x0000;
+
+ const ushort c = 0x0000;
+ p &= c;
+ }
+
+ public static void Main ()
+ {
+ Foo (1);
+ }
+}
\ No newline at end of file
Modified: mcs/tests/ver-il-net_4_5.xml
===================================================================
@@ -17206,6 +17206,9 @@
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void BrokenLiftedNull()" attrs="129">
+ <size>82</size>
+ </method>
</type>
</test>
<test name="gtest-541.cs">
@@ -48198,6 +48201,19 @@
</method>
</type>
</test>
+ <test name="test-870.cs">
+ <type name="Test">
+ <method name="Void Foo(UInt16)" attrs="145">
+ <size>23</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-88.cs">
<type name="X">
<method name="Void f(System.String)" attrs="145">
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.