2014-08-13 10:39:27 +01:00
|
|
|
// CS0165: Use of unassigned local variable `x'
|
|
|
|
// Line: 21
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
class X
|
|
|
|
{
|
|
|
|
static bool Foo (out int x)
|
|
|
|
{
|
|
|
|
x = 5;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static int Main ()
|
|
|
|
{
|
|
|
|
int x;
|
|
|
|
try {
|
|
|
|
throw new ApplicationException ();
|
2015-04-07 09:35:12 +01:00
|
|
|
} catch when (Foo (out x)) {
|
2014-08-13 10:39:27 +01:00
|
|
|
return 1;
|
2015-04-07 09:35:12 +01:00
|
|
|
} catch when (x > 0) {
|
2014-08-13 10:39:27 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|