rust/src/test/compile-fail/not-a-pred-3.rs
2011-07-27 15:54:33 +02:00

13 lines
231 B
Rust

// -*- rust -*-
// error-pattern: expected the constraint name
obj f() {
fn g(q: int) -> bool { ret true; }
}
fn main() {
let z = f();
// should fail to typecheck, as z.g isn't an explicit name
check (z.g(42));
}