Author: marek
Date: 2006-09-23 14:39:27 -0400 (Sat, 23 Sep 2006)
New Revision: 65834
Added:
trunk/mcs/errors/cs0283-3.cs
trunk/mcs/errors/cs1547-6.cs
trunk/mcs/errors/cs1547-7.cs
trunk/mcs/errors/gcs0019-4.cs
trunk/mcs/errors/gcs0029-2.cs
trunk/mcs/errors/gcs0029-3.cs
trunk/mcs/errors/gcs0030-2.cs
trunk/mcs/errors/gcs1547-2.cs
Log:
New tests.
Added: trunk/mcs/errors/cs0283-3.cs
===================================================================
--- trunk/mcs/errors/cs0283-3.cs 2006-09-23 18:37:59 UTC (rev 65833)
+++ trunk/mcs/errors/cs0283-3.cs 2006-09-23 18:39:27 UTC (rev 65834)
@@ -0,0 +1,8 @@
+// CS0283: The type `int*' cannot be declared const
+// Line: 10
+// Compiler options: -unsafe
+
+unsafe class Test
+{
+ const int* o = null;
+}
\ No newline at end of file
Added: trunk/mcs/errors/cs1547-6.cs
===================================================================
--- trunk/mcs/errors/cs1547-6.cs 2006-09-23 18:37:59 UTC (rev 65833)
+++ trunk/mcs/errors/cs1547-6.cs 2006-09-23 18:39:27 UTC (rev 65834)
@@ -0,0 +1,6 @@
+// CS1547: Keyword `void' cannot be used in this context
+// Line: 6
+
+class C {
+ object o = new void();
+}
\ No newline at end of file
Added: trunk/mcs/errors/cs1547-7.cs
===================================================================
--- trunk/mcs/errors/cs1547-7.cs 2006-09-23 18:37:59 UTC (rev 65833)
+++ trunk/mcs/errors/cs1547-7.cs 2006-09-23 18:39:27 UTC (rev 65834)
@@ -0,0 +1,12 @@
+// CS1547: Keyword `void' cannot be used in this context
+// Line: 6
+
+class C
+{
+ int Foo ()
+ {
+ foreach (void v in this)
+ {
+ }
+ }
+}
\ No newline at end of file
Added: trunk/mcs/errors/gcs0019-4.cs
===================================================================
--- trunk/mcs/errors/gcs0019-4.cs 2006-09-23 18:37:59 UTC (rev 65833)
+++ trunk/mcs/errors/gcs0019-4.cs 2006-09-23 18:39:27 UTC (rev 65834)
@@ -0,0 +1,16 @@
+// CS0019: Operator `+' cannot be applied to operands of type `EventHandler'
and `T'
+// Line: 10
+
+using System;
+
+public delegate void EventHandler (int i, int j);
+
+public class Button {
+
+ public event EventHandler Click;
+
+ public void Connect<T> () where T : class
+ {
+ Click += default (T);
+ }
+}
Added: trunk/mcs/errors/gcs0029-2.cs
===================================================================
--- trunk/mcs/errors/gcs0029-2.cs 2006-09-23 18:37:59 UTC (rev 65833)
+++ trunk/mcs/errors/gcs0029-2.cs 2006-09-23 18:39:27 UTC (rev 65834)
@@ -0,0 +1,10 @@
+// CS0029: Cannot implicitly convert type `T' to `int*'
+// Line : 8
+// Compiler options: -unsafe
+
+class T {
+ static unsafe int Main ()
+ {
+ int *a = default(T);
+ }
+}
Added: trunk/mcs/errors/gcs0029-3.cs
===================================================================
--- trunk/mcs/errors/gcs0029-3.cs 2006-09-23 18:37:59 UTC (rev 65833)
+++ trunk/mcs/errors/gcs0029-3.cs 2006-09-23 18:39:27 UTC (rev 65834)
@@ -0,0 +1,9 @@
+// CS0029: Cannot implicitly convert type `bool' to `int'
+// Line : 7
+
+class T {
+ static int Main ()
+ {
+ int a = default(bool);
+ }
+}
Added: trunk/mcs/errors/gcs0030-2.cs
===================================================================
--- trunk/mcs/errors/gcs0030-2.cs 2006-09-23 18:37:59 UTC (rev 65833)
+++ trunk/mcs/errors/gcs0030-2.cs 2006-09-23 18:39:27 UTC (rev 65834)
@@ -0,0 +1,12 @@
+// CS0030: Cannot convert type `X' to `S'
+// Line: 10
+
+struct S {
+}
+
+class X {
+ static void Main ()
+ {
+ S s = (S)default(X);
+ }
+}
Added: trunk/mcs/errors/gcs1547-2.cs
===================================================================
--- trunk/mcs/errors/gcs1547-2.cs 2006-09-23 18:37:59 UTC (rev 65833)
+++ trunk/mcs/errors/gcs1547-2.cs 2006-09-23 18:39:27 UTC (rev 65834)
@@ -0,0 +1,10 @@
+// CS1547: Keyword `void' cannot be used in this context
+// Line: 8
+
+class X
+{
+ static void Main ()
+ {
+ object o = default(void);
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches