aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/lazy-and-or.rs
blob: 81f09843826bc5a846112c161a141c337900168a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
fn incr(mutable &int x) -> bool {
  x += 1;
  check (false);
  ret false;
}

fn main() {

  auto x = (1 == 2) || (3 == 3);
  check (x);

  let int y = 10;
  log x || incr(y);
  check (y == 10);

  if (true && x) {
    check (true);
  } else {
    check (false);
  }

}