aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/not-a-pred-3.rs
blob: f4dafd204d797366cd1b343b0d7c14400f94d15a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// -*- rust -*-
// xfail-boot
// xfail-stage0

// error-pattern: expected the constraint name

obj f () {
  fn g (int q) -> bool {
    ret true;
  }
}

fn main() {
  auto z = f ();
  check (z.g)(42); // should fail to typecheck, as z.g isn't an explicit name
}