Merge branch 'xml-fixes' of https://github.com/myeisha/mono into myeisha-xml-fixes
[mono-project.git] / mcs / errors / cs1686-3.cs
blob42f14369a7fae74c4b49d25f2435fe5cf71477dd
1 // CS1686: Local variable or parameter `i' cannot have their address taken and be used inside an anonymous method or lambda expression
2 // Line: 18
3 // Compiler options: -unsafe
5 unsafe struct S
7 public int i;
10 class C
12 unsafe delegate int* D ();
14 static void Main ()
16 unsafe {
17 S str = new S ();
18 D d = delegate { return &str.i; };