Xamarin Public Jenkins (auto-signing) 6bdd276d05 Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
2017-04-10 11:41:01 +00:00

35 lines
456 B
C#

using System;
class X
{
static int Main ()
{
int? intArg = 1;
long? longArg = 2;
var g = intArg ?? longArg;
Console.WriteLine (g);
if (g != 1)
return 1;
intArg = null;
g = intArg ?? longArg;
Console.WriteLine (g);
if (g != 2)
return 2;
longArg = null;
g = intArg ?? longArg;
Console.WriteLine (g);
if (g != null)
return 3;
return 0;
}
const Action cf = null;
void Foo (Action f)
{
var x = f ?? cf;
}
}