+// Compiler options: -unsafe
+
// Cloning tests
using System;
+unsafe class UnsafeClass
+{
+ public int* GetUnsafeValue ()
+ {
+ return null;
+ }
+}
+
public class C
{
delegate void D ();
{
}
+ unsafe static void UnsafeTests ()
+ {
+ UnsafeClass v = new UnsafeClass ();
+ Test (delegate () {
+ int i = *v.GetUnsafeValue ();
+ });
+
+ Test (delegate () {
+ byte* buffer = stackalloc byte[8192];
+ });
+ }
+
public static void Main ()
{
Exception diffException;
}
}
+