aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/lazy-and-or.rs
blob: fe0ffe6b21b991964411b906f2d97018e35c49f9 (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);
  }

}