Author: marek
Date: 2005-03-21 04:18:14 -0500 (Mon, 21 Mar 2005)
New Revision: 42043
Added:
trunk/mcs/errors/cs1664.cs
trunk/mcs/errors/cs1708.cs
Modified:
trunk/mcs/errors/gmcs-expect-wrong-error
Log:
new tests
Added: trunk/mcs/errors/cs1664.cs
===================================================================
--- trunk/mcs/errors/cs1664.cs 2005-03-21 09:17:15 UTC (rev 42042)
+++ trunk/mcs/errors/cs1664.cs 2005-03-21 09:18:14 UTC (rev 42043)
@@ -0,0 +1,8 @@
+// cs1642.cs: Fixed sized buffer of length '1073741825' and type 'long' is too
big
+// Line: 7
+// Compiler options: -unsafe
+
+public unsafe struct C
+{
+ private fixed long test_1 [1073741825];
+}
Added: trunk/mcs/errors/cs1708.cs
===================================================================
--- trunk/mcs/errors/cs1708.cs 2005-03-21 09:17:15 UTC (rev 42042)
+++ trunk/mcs/errors/cs1708.cs 2005-03-21 09:18:14 UTC (rev 42043)
@@ -0,0 +1,30 @@
+// cs1708.cs: Fixed buffers can only be accessed through locals or fields
+// Line: 27
+// Compiler options: -unsafe
+
+using System;
+
+unsafe struct S
+{
+ public fixed int array [2];
+}
+
+class C
+{
+ unsafe public S Get ()
+ {
+ return new S ();
+ }
+}
+
+public class Tester
+{
+ public static void Main() { }
+
+ unsafe void setName()
+ {
+ C c = new C();
+ c.Get ().array [1] = 44;
+ }
+}
+
Modified: trunk/mcs/errors/gmcs-expect-wrong-error
===================================================================
--- trunk/mcs/errors/gmcs-expect-wrong-error 2005-03-21 09:17:15 UTC (rev
42042)
+++ trunk/mcs/errors/gmcs-expect-wrong-error 2005-03-21 09:18:14 UTC (rev
42043)
@@ -117,6 +117,7 @@
cs1656.cs
cs1657.cs
cs1663.cs
+cs1664.cs
cs1665.cs
cs1666.cs
cs1670.cs
@@ -124,6 +125,7 @@
cs1671.cs
cs1677-2.cs
cs1677.cs
+cs1708.cs
cs1715.cs
cs2007.cs
cs3003-5.cs
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches