[mcs] C#7 type pattern matching
[mono.git] / mcs / errors / cs8200-4.cs
1 // CS8200: Out variable and pattern variable declarations are not allowed within constructor initializers, field initializers, or property initializers
2 // Line: 8
3
4 using System;
5
6 public class C
7 {
8         event Action H = Foo (out var res);
9
10         static Action Foo (out int arg)
11         {
12                 arg = 2;
13                 return null;
14         }
15 }