Merge pull request #3769 from evincarofautumn/fix-verify-before-allocs
[mono.git] / mcs / errors / cs0177-14.cs
1 // CS0177: The out parameter `val' must be assigned to before control leaves the current method
2 // Line: 12
3
4 public class A
5 {
6         public bool GetValue (out int val)
7         {
8                 val = 0;
9                 return true;
10         }
11
12         public void ReallyGetValue (out int val)
13         {
14                 if (AlwaysReturnTrue () || GetValue (out val)) {
15                 }
16         }
17
18         public bool AlwaysReturnTrue ()
19         {
20                 return true;
21         }
22 }