rust/src/test/compile-fail/block-arg-as-stmt-with-value.rs
Gareth Daniel Smith 6d86969260 change the test suite //! kind syntax to //~ kind in order to avoid a
conflict with the new single-line-sugared-inner-doc-comment (`//! ...`).
2012-06-30 12:23:59 +01:00

14 lines
233 B
Rust

fn compute1() -> float {
let v = [0f, 1f, 2f, 3f]/~;
vec::foldl(0f, v) { |x, y| x + y } - 10f
//~^ ERROR mismatched types: expected `()`
}
fn main() {
let x = compute1();
log(debug, x);
assert(x == -4f);
}