Revert "allow fn exprs to omit arg types"
This reverts commit 1ba4ca4c4a.
This commit is contained in:
parent
1ba4ca4c4a
commit
cfa09d35a3
10 changed files with 103 additions and 178 deletions
|
|
@ -1,2 +0,0 @@
|
|||
fn foo(x) { //! ERROR expecting ':' but found ')'
|
||||
}
|
||||
|
|
@ -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`
|
||||
}
|
||||
|
|
@ -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`
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue