Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

26 lines
414 B
C#

//
// 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;
}
}