[tuner] handle the case with multiple "preserve" attributes
[mono-project.git] / mcs / tests / test-anon-70.cs
blobd0fe4b7a07a7e3867f65815af18f0fe09b435a9a
1 // Compiler options: -unsafe
3 // Cloning tests
5 using System;
7 unsafe class UnsafeClass
9 public int* GetUnsafeValue ()
11 return null;
15 public class C
17 delegate void D ();
19 static void Test (D d)
23 unsafe static void UnsafeTests ()
25 UnsafeClass v = new UnsafeClass ();
26 Test (delegate () {
27 int i = *v.GetUnsafeValue ();
28 });
30 Test (delegate () {
31 byte* buffer = stackalloc byte[8192];
32 });
35 public static void Main ()
37 Exception diffException;
39 Test (delegate () {
40 diffException = null;
41 try {
42 } catch (Exception ex) {
43 diffException = ex;
44 } finally {
47 try {
48 } catch {
50 });
52 int[] i_a = new int [] { 1,2,3 };
54 Test (delegate () {
55 foreach (int t in i_a) {
57 });
59 Test (delegate () {
60 Console.WriteLine (typeof (void));
61 });