blob: 1ddf19c0d97812ee4a32dd3f0030a2644e2e36e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//
// Checks that we do not short-circuit the bitwise and operation
// See bug: 359789
//
public class M {
static bool called;
public static bool g() {
called = true;
return false;
}
public static int Main() {
called = false;
System.Console.WriteLine (false & g());
if (!called)
return 1;
called = false;
System.Console.WriteLine (true | g());
if (!called)
return 1;
return 0;
}
}
|