summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0208-3.cs
blob: 5932dbe6b8718d42e83b24210a78568117d78c41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type `Foo.P'
// Line: 18
// Compiler options: -unsafe

public unsafe class Foo
{
        public class P
        {
            public P* GetEnumerator ()
            {
                return null;
            }
        }
       
        public static void Main ()
        {
            P o = new P ();
            foreach (P p in o)
            {
            }
        }
}