You've already forked linux-packaging-mono
Imported Upstream version 3.10.0
Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
35
mcs/tests/test-904.cs
Normal file
35
mcs/tests/test-904.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
|
||||
class Test
|
||||
{
|
||||
public static bool Foo (out int v)
|
||||
{
|
||||
v = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void Main()
|
||||
{
|
||||
bool b = false;
|
||||
|
||||
int a1;
|
||||
var r1 = (false || Foo (out a1)) ? a1 : 1;
|
||||
|
||||
int a2;
|
||||
var r2 = (true && Foo (out a2)) ? 2 : a2;
|
||||
|
||||
int a3;
|
||||
var r3 = (b || Foo (out a3)) && Foo (out a3);
|
||||
int b3 = a3;
|
||||
|
||||
int a4;
|
||||
var r4 = ((b || Foo (out a4)) && Foo (out a4));
|
||||
int b4 = a4;
|
||||
|
||||
int a5;
|
||||
if ((b || Foo (out a5)) && (b || Foo (out a5)))
|
||||
Console.WriteLine ();
|
||||
else
|
||||
Console.WriteLine (a5);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user