Revert "allow fn exprs to omit arg types"

This reverts commit 1ba4ca4c4a.
This commit is contained in:
Niko Matsakis 2012-05-03 14:42:34 -07:00
parent 1ba4ca4c4a
commit cfa09d35a3
10 changed files with 103 additions and 178 deletions

View file

@ -1,2 +0,0 @@
fn foo(x) { //! ERROR expecting ':' but found ')'
}

View file

@ -1,9 +0,0 @@
fn let_in<T>(x: T, f: fn(T)) {}
fn main() {
let_in(3u, fn&(i) { assert i == 3; });
//!^ ERROR expected `uint` but found `int`
let_in(3, fn&(i) { assert i == 3u; });
//!^ ERROR expected `int` but found `uint`
}

View file

@ -1,8 +0,0 @@
type foo = option<int>;
fn bar(_t: foo) {}
fn main() {
// we used to print foo<int>:
bar(some(3u)); //! ERROR mismatched types: expected `foo`
}

View file

@ -4,6 +4,7 @@ fn concat<T: copy>(v: [const [const T]]) -> [T] {
// Earlier versions of our type checker accepted this:
vec::iter(v) {|&&inner: [T]|
//!^ ERROR values differ in mutability
//!^^ ERROR values differ in mutability
r += inner;
}