Author: marek
Date: 2008-01-25 06:37:44 -0500 (Fri, 25 Jan 2008)
New Revision: 93884
Added:
trunk/mcs/tests/gtest-366.cs
Modified:
trunk/mcs/tests/gtest-etree-01.cs
Log:
New test.
Added: trunk/mcs/tests/gtest-366.cs
===================================================================
--- trunk/mcs/tests/gtest-366.cs 2008-01-25 11:37:10 UTC (rev 93883)
+++ trunk/mcs/tests/gtest-366.cs 2008-01-25 11:37:44 UTC (rev 93884)
@@ -0,0 +1,27 @@
+
+public struct MyType
+{
+ int value;
+
+ public MyType (int value)
+ {
+ this.value = value;
+ }
+
+ public static implicit operator int (MyType o)
+ {
+ return o.value;
+ }
+}
+
+class Tester
+{
+ static void Assert<T> (T expected, T value)
+ {
+ }
+
+ static void Main ()
+ {
+ Assert (10, new MyType (10));
+ }
+}
\ No newline at end of file
Property changes on: trunk/mcs/tests/gtest-366.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/mcs/tests/gtest-etree-01.cs
===================================================================
--- trunk/mcs/tests/gtest-etree-01.cs 2008-01-25 11:37:10 UTC (rev 93883)
+++ trunk/mcs/tests/gtest-etree-01.cs 2008-01-25 11:37:44 UTC (rev 93884)
@@ -126,8 +126,7 @@
Expression<Func<MyType, MyType, MyType>> e3 = (MyType a, MyType
b) => a + b;
AssertNodeType (e3, ExpressionType.Add);
-// FIXME: type inference
-// Assert (10, e3.Compile ().Invoke (new MyType (-20), new MyType
(30)));
+ Assert (10, e3.Compile ().Invoke (new MyType (-20), new MyType
(30)));
}
void AddCheckedTest ()
@@ -143,8 +142,7 @@
Expression<Func<MyType, MyType, MyType>> e3 = (MyType a, MyType
b) => a + b;
AssertNodeType (e3, ExpressionType.Add);
-// FIXME: type inference
-// Assert (10, e3.Compile ().Invoke (new MyType (-20), new MyType
(30)));
+ Assert (10, e3.Compile ().Invoke (new MyType (-20), new MyType
(30)));
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches